RichTextFX icon indicating copy to clipboard operation
RichTextFX copied to clipboard

RichTextDemo Fonts Don't Display Correctly

Open darkwyrm opened this issue 1 year ago • 2 comments

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.

Font Display Issue

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

darkwyrm avatar Apr 17 '23 15:04 darkwyrm

It might be due to javafx.
There is no simple solution for the font issue in javafx.

cyfung1031 avatar Apr 24 '23 02:04 cyfung1031

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.

darkwyrm avatar May 01 '23 10:05 darkwyrm