Table of Contents |
---|
JavaFX and Fonts
JavaFX will usually require no additional setup of fonts. However, some configurations or use cases require additional setup of fonts.
...
You can include a custom font in a JavaFX application JAR bundle. Refer to How to Embed Fonts. You can also load a web font by passing the URL to using the loadFont() method. Refer to the Font classin the JavaFX API Documentation.
Big Fonts
Fonts can be rendered by either using a cached raster (bitmap) or with a path. Generally fonts look better when rendered from a raster includes hinting and other tricks to make it look its best. JavaFX caches rasterized characters up to a size limit, and then uses paths for rendering after than. Adjusting this limit might improve performance for some types of applications that a limited set of very large characters, though at an impact to the texture cache. To change the default value of 80 pixels, use
-Dprism.fontSizeLimit=xx
Embedded Device Fonts
On Linux, JavaFX will use fontconfig to find fonts. Fontconfig provides for a powerful means of identifying and finding installed fonts. It is usually associated with X11, but does not require it.
...