Add more useful APIs to javafx.scene.text.Font
Glavo
zjx001202 at gmail.com
Sun May 4 08:18:24 UTC 2025
Hi,
We have noticed that JavaFX's strategy for selecting default fonts can
sometimes be quite odd,
and at times it doesn't properly follow the fontconfig configuration. As a
result,
we frequently receive feedback from Linux users reporting that all Chinese
characters appear as garbled text.
This[1] is one piece of the feedback that contains useful information.
We are not sure whether these problems can be solved. However, we've
noticed that unlike AWT,
javafx.scene.text.Font API lacks most useful methods. For example, it does
not provide
canDisplay/canDisplayUpTo methods, making it impossible to determine
whether
a font can render a given text. I found that CharToGlyphMapper actually
contains
the corresponding method, but it is not exposed through the Font API.
So is it possible to add more useful API methods to Font, like AWT does?
This will be of great help to us.
Glavo
[1]: https://github.com/HMCL-dev/HMCL/issues/3104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250504/070d65a0/attachment.htm>
More information about the openjfx-dev
mailing list