Add more useful APIs to javafx.scene.text.Font

Glavo zjx001202 at gmail.com
Mon May 12 15:44:45 UTC 2025


I hope this issue gets more attention. Can anyone take a look at this email?

Glavo

On Sun, May 4, 2025 at 4:18 PM Glavo <zjx001202 at gmail.com> wrote:

> 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/20250512/fc31c474/attachment.htm>


More information about the openjfx-dev mailing list