Glyph font fails in Java

Does anyone know of an existing solution for scrolling a font in Java? For example, our designers decided that Calibri is a font that mostly suits our needs, but if I specify Calibri, it naturally cannot display characters that do not have a corresponding glyph in that font. In this case, I will need it to fall through to the second specified font, and if all else fails - use one of the Java logical fonts.

Has anyone come up with a solution for this that can be plugged into existing Swing components without having to write custom Swing components for the entire project?

This is a very old project and it is not possible to create custom graphical components.

+3


source to share


1 answer


This is not a code-behind solution and probably won't have much support as it requires a local local file for each user, but just in case ...

You can add fallback fonts to a dedicated directory in your JRE installation. From Java documentation :



Users can add a physical font as a fallback font to logical fonts used in Java 2D rendering by installing it to a directory lib/fonts/fallback

in the JRE.

+1


source







All Articles