Thai Fonts on OpenJDK / Azul Zulu Builds of OpenJDK

In some situations, text written in Thai isn't displayed correctly on Windows when running an application on OpenJDK or Azul Zulu Builds of OpenJDK. Rectangular placeholder signs are then showed instead of the correct Thai glyphs. As solution, point the JRE to a different font of the operating system, for example Tahoma is a good choice, which provides more Thai glyphs than the JRE's default choice of Lucida Sans Regular.

Configuration steps to change the JRE's default font choice for Thai:

First, locate your JRE installation directory. Here as placeholder I use JREHOME.

From there, copy the file JREHOME/lib/ to a directory related to the application you like to run or to some other place which won't be overwritten on later JRE updates and use as filename (without the .src in the end). For example:


In MYDIR/ change the entries allfonts.thai, sequence.allfonts and sequence.fallback, to the following:


We changed the default font to Tahoma and appended thai in the 2 other parameters.

Now change the java command line used to start the application to point to this new file, for example:

java -Dsun.awt.fontconfig=MYDIR/ -jar myapp.jar

If you try it out on the Windows Powershell console, you have to enclose the parameter with quotes:

java '-Dsun.awt.fontconfig=MYDIR/' -jar myapp.jar

That's all. Later when you upgrade the JRE, no change is needed as you placed the new configuration file outside of the JRE directory to avoid it to be overwritten or deleted during upgrades.

For other languages or writing systems this solution can also be applied. Then instead of appending "thai" in the two parameters, use the abbreviation of that language. See JDK-8008572 as examples.

Add Comment



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful