<div dir="ltr">Yes, but I don't know much about the font area. Also, "Christmas shopping lists" can be difficult to respond to. You'll need to wait for someone who has input.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jul 23, 2025 at 8:41 PM Glavo <<a href="mailto:zjx001202@gmail.com">zjx001202@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Has anyone seen this email?<div><br></div><div>Glavo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 21, 2025 at 2:29 AM Glavo <<a href="mailto:zjx001202@gmail.com" target="_blank">zjx001202@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>We noticed that the Font API had many bugs and inconsistencies, and was missing a lot of functionality.</div><div>Unfortunately, I don't have enough knowledge in this field to solve them.</div><div>So I'm making some feature requests/improvement suggestions on this to see if anyone is interested.</div><div><br></div><div>1. Unify the meaning of "font family".<br><br></div><div>Currently "font family" has different meanings on different platforms:</div><div><ul><li style="margin-left:15px">On Windows, it usually means the localized name of the font family name (nameID=1);</li><li style="margin-left:15px">On Linux, it usually means the non-localized font family name (nameID=1, langID=0x0);</li><li style="margin-left:15px">On macOS, it usually means the non-localized typographical family name (nameID=16, langID=0x0).</li></ul><div>This inconsistency makes the behavior of the program confusing and it is impossible to know what will happen without testing on multiple platforms.</div></div><div><br></div><div>I want JavaFX to use the non-localized typographical family name (nameID=16, langID=0x0) on all platforms.</div><div>The reason is that the font family name (nameID=1) of many fonts actually contains the font style information, </div><div>and using it makes it difficult for us to select font style.</div><div><br></div><div>For example, if we want to get JetBrains Mono Bold on Windows, we need to use <font face="monospace">Font.font("JetBrains Mono", FontWeight.BOLD, 13)</font>, </div><div>but to get JetBrains Mono ExtraBold, we need to use <font face="monospace">Font.font("JetBrains Mono ExtraBold", FontWeight.NORMAL, 13)</font>.</div></div><div dir="ltr"><div>This is really frustrating :(</div><div><br></div><div>Additionally, I encountered a bug on macOS that prevented me from selecting the font weight.</div><div>I explained this issue in a previous email: <a href="https://mail.openjdk.org/pipermail/openjfx-dev/2025-July/055417.html" target="_blank">https://mail.openjdk.org/pipermail/openjfx-dev/2025-July/055417.html</a></div><div><br></div><div>2. Make <font face="monospace">Font.font(String) </font>accept both font name and font family name.</div><div><br></div><div>I wish <font face="monospace">Font.font(</font><span style="font-family:monospace">String</span><font face="monospace">)</font> could accept more names than just the font family name.</div><div><br></div><div>As mentioned in the previous section, the current concept of font family names in JavaFX is confusing and often contains font style information.</div><div>Therefore, it is very difficult to use the <font face="monospace">Font.font(</font><span style="font-family:monospace">String</span><font face="monospace">)</font> in the correct way.</div><div>If it would accept a variety of font names, both localized and non-localized, it would be less difficult to use.</div><div><br></div><div>3. Add more methods to get font localized names</div><div><br></div><div>I would like to get these methods in <font face="monospace">Font</font> class to get the localized name of the font:</div><div><ul><li><font face="monospace">static Map<Locale, String> getLocalizedFamilyNames(String family)</font></li><li><font face="monospace">static String getLocalizedFamilyName(String family, Locale locale)</font></li><li><font face="monospace">static String getLocalizedFontNames(Locale locale)</font></li><li><font face="monospace">static String getLocalizedFontNames(String family, Locale locale)</font></li><li><font face="monospace">Map<Locale, String> getLocalizedNames()</font></li><li><font face="monospace">String getLocalizedName(Locale locale)</font></li><li><font face="monospace">Map<Locale, String> getLocalizedFamily()</font></li><li><font face="monospace">String getLocalizedFamily(Locale locale)</font></li></ul><div><font face="arial, sans-serif">4. More methods for handling font styles</font></div><div><br></div><div>Right now we can only use FontWeight and FontPosture to select a font style when looking up a font, </div><div>but the only way to get the style from a given Font object is <font face="monospace">Font::getStyle()</font>, which is very asymmetrical.</div></div><div><font face="monospace"><br></font></div><div>I would like to get these methods to handle font styles:</div><div><ul><li><font face="monospace">static List<String> getStyles(String family)</font></li><li><font face="monospace">static Font font(String family, String style)</font></li><li><font face="monospace">FontWeight getWeight()</font></li><li><font face="monospace">FontPosture getPosture()</font></li></ul></div><div><font face="monospace">5. </font>Support fallback fonts and CSS font list for UI controls</div><div><font face="monospace">6. </font>Provides a way to control the typographic features of fonts</div><div> Refer to Flutter's FontFeature class: <a href="https://api.flutter.dev/flutter/dart-ui/FontFeature-class.html" target="_blank">https://api.flutter.dev/flutter/dart-ui/FontFeature-class.html</a></div><div><br></div><div>Glavo</div></div>
</div>
</div>
</blockquote></div>
</blockquote></div>