It’s just that the Java program seems to be incompatible with Siyuan Hei fonts. So what is the solution to the problem that Linux system Java is not compatible with Siyuan Hei fonts?
Although Oracle's official documentation states that OTF fonts have been supported starting from Java 7, methods such as createFont can still provide support for OTF fonts using parameters such as TRUETYPE_FONT, but Siyuan Heibo will appear in squares when displaying Chinese characters in Java programs, especially simplified Chinese. In the language environment, the font seems to be using the Siyuan Heilongjiang Traditional Chinese version for Taiwan and Hong Kong, but not the Simplified Chinese version. Some words cannot be displayed and are replaced by squares.
In the absence of extra energy to study font issues, the current guess is that the Siyuan font is released in OTF format and there is a problem with Hinting information inside, causing problems with Java recognition. In addition, the language encoding of the font may also be a problem. The temporary alternative is to use TTF fonts without hinting information, such as fonts produced by communities such as XHei and Minglan (without hinting information). It is also recommended to delete the fontconfig configuration that comes with the installation of the Siyuan Heibo software package, and then Directly modify files such as 65-nonlatin.conf in fontconfig to customize the matching priority of the alternative fonts you use, etc.
Okay, the above is all the content brought to you by the editor of Huajun. Isn’t it very simple? Have you learned it? If you want to know more related content, please pay attention to Huajun information at any time. Welcome to Huajun to download!