I have an applet with JLabel, JTextField and other Java Swing components. On the other hand, i have unicode fonts "AR", "AR-ExtB" (extended B area) and "AR-Plus" (Supplementary Private Use Area-A) which are .ttf files. I want the applet to use the three .ttf files on every GUI component, depending on the code points that the users enters.
1) I know that there is no option for these components to work with multiple fonts. So, the explicit way to set the fonts to the components is not an option.
2) Well, there is a way to accomplish this by modifying the fontconfig.properties file in $JAVA_HOME/lib directory, where, for example, the "Dialog" (logical) font has mapped the three .ttf files as one logical font, but the problem is that all other java applications, also will have these fonts, and that is not the wanted scenario.
3) "Fallback fonts", used when there is no other font that can display the glyphs on the screen. This also is not a solution, because it will display only the characters that are not covered by JAVA default font.
The question is:
Do anyone have an idea how to use these .ttf files as font in every GUI Swing component, but only within the Applet, not globally for all applications that run on JVM ?