-
Bug
-
Resolution: Unresolved
-
P5
-
7u6
-
Master JavaFX 2.2 - b15:
Product: javafx-2.2.0beta
Platform: macosx-universal
Build-Number: 112
Build-ID: 2012-06-26_22-35-40
Font.getFontNames() returns a font name "Tahoma Negreta"
However - if you use that name to create a font, you obtain a font named "Tahoma Bold":
Font font = new Font("Tahoma Negreta", 15);
System.out.println(font.getName()); => prints "Tahoma Bold"
If you later try to change the size, or recreate a font from that name, you end up with the System font:
Font font2 = new Font(font.getName(), font.getSize());
System.out.println(font2.getName()); => prints System.
This prevent the Tahoma font from being correctly persisted in FXML, since serializing "Tahoma Bold" gives back "System Regular" when you reload. This also prevents the SceneBuilder FontChooser from working correctly - since changing the font size replaces the font with System.
On Mac OS - this is the only font that exhibit this strange behavior (I haven't tried on windows yet).
However - if you use that name to create a font, you obtain a font named "Tahoma Bold":
Font font = new Font("Tahoma Negreta", 15);
System.out.println(font.getName()); => prints "Tahoma Bold"
If you later try to change the size, or recreate a font from that name, you end up with the System font:
Font font2 = new Font(font.getName(), font.getSize());
System.out.println(font2.getName()); => prints System.
This prevent the Tahoma font from being correctly persisted in FXML, since serializing "Tahoma Bold" gives back "System Regular" when you reload. This also prevents the SceneBuilder FontChooser from working correctly - since changing the font size replaces the font with System.
On Mac OS - this is the only font that exhibit this strange behavior (I haven't tried on windows yet).
- relates to
-
JDK-8116431 Font Chooser issue
-
- Closed
-