miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

Text3d ignores fonts #30

Closed madhephaestus closed 7 years ago

madhephaestus commented 7 years ago

Using public Text3d(String text, String fontName, double fontSize, double depth) and Font names:

"Times New Roman" "Arial" "Helvetica"

All produce the same result.

(This is cool feature to finally have, thank you!)

madhephaestus commented 7 years ago

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); String [] fonts = ge.getAvailableFontFamilyNames();

Should be consulted for a list of availible fonts on a given system. If the font is missing form the list, maybe an error? Or at least a warning message?

miho commented 7 years ago

Your proposal uses the AWT/Swing APIs. We use FXyz which uses JavaFX for font rendering. ge.getAvailableFontFamilyNames() does not necessarily return the correct fonts since it does not know about custom fonts that might have been added to JavaFX.

If you need more support here, you should probably talk to the FXyz developers.