RichTextFX
RichTextFX copied to clipboard
RichTextDemo Fonts Don't Display Correctly
The RichTextDemo does not display different font families correctly. Symptoms are not consistent -- I can't figure out what pattern the symptoms follow, but applying a different font family to selected text results in a different font being used, but not the one selected. For example, choosing Century Gothic results in some serif font being used. I have confirmed symptoms under both Windows and Linux Mint 21.
Below is a screenshot demonstrating the symptoms along with how the same text appears in LibreOffice Writer for comparison purposes.
It almost appears that Arial is being used by RichTextDemo for both Arial and Wingdings, but some kind of serif font for Century Gothic.
Expected Behavior
Select text, apply font family, and selected text is changed to selected font family
Actual Behavior
Select text, apply font family, and selected text is changed to some other font than what is chosen
Reproducible Demo
Run the RichTextDemo from current on the main branch, type in some text and select it, and choose a different font from the dropdown.
Environment info:
- RichTextFX Version: 0.11.0
- Operating System: Windows 10, Linux Mint Cinnamon 21
- Java version: Java 17
It might be due to javafx.
There is no simple solution for the font issue in javafx.
I can confirm that it isn't JavaFX -- I have a different project which uses just a regular JavaFX TextArea and Century Gothic looks like it should.