I downloaded the open source java open source gui POS software and would like to change it to be able to display a font without Unicode, which includes our local language.
I know that I can change the font of the gui components to component.setFont(new java.awt.Font("MyFont", 1, 14)), but there are many components to change to make it visible. Instead, I think that changing the default JRE font will be much easier than changing the code.
According to the Java Document , I tried as shown below, but it does not work.
Changed fontconfig.properties.srcto fontconfig.propertiesin sectionjre/lib/
In fontconfig.properties
Font names changed to the one I want like this.
serif.plain.alphabetic=Times New Roman (=> serif.plain.alphabetic=MyFont)
sansserif.plain.alphabetic=Arial (=> serif.plain.alphabetic=MyFont)
monospaced.plain.alphabetic=Courier New (=> serif.plain.alphabetic=MyFont)
dialog.plain.alphabetic=Arial (=> serif.plain.alphabetic=MyFont)
dialoginput.plain.alphabetic=Courier New (=> serif.plain.alphabetic=MyFont)
and finally added this line.
filename.MyFont=MyFont.ttf
:
Windows 7, jdk1.7.0
? . :)