Wine's Chinese display and freetype-general Linux technology-Linux programming and kernel information. The following is a detailed description. Currently, some wine of linuxer cannot display Chinese characters. Instead, we need to modify wine code to display Chinese characters. I hope this post can help them.
I thought that the new wine only needs to be re-compiled to support Chinese characters. However, after my experiments, I found that this is conditional and requires the freetype development kit, generally, it is called libfreetype-dev and other names (different versions). After it is installed and compiled, it can support the Chinese truetype font.
When I installed redhat7.3, most software packages were installed, so there was no Chinese problem. I tried to delete the font directory in config yesterday and found that the redhat Simplified Chinese cannot be displayed, but the traditional Chinese can be displayed, however, debian's simplified and traditional Chinese characters cannot be displayed. After a rough look at the code, the processing process of the simplified and traditional Chinese characters is the same, except for the codepage file and the specified default font, I guess there is a default font defined by wine, so it can display traditional Chinese software. I have previously defined the simsun font in notepad. When the font is smaller than 16, we use the dot matrix font embedded in simsun, while the large font uses the truetype font with the anti-aliasing. I didn't pay attention to it. I thought it was a wine mechanism. It is only now related to freetype.
I tried mozilla, which supports freetype. I found that the simsun font is also a dot matrix font embedded in simsun. Unlike zysong, small fonts also use anti-aliasing. I have never tried gnome2 and kde3, but it should be similar. The results are excited, using any xft software, including software using kde3/qt3 and gnome2/gtk2, you can directly copy the font of the embedded dot matrix font to the font directory defined by Xftconfig without making the so-called "Chinese", so that you can get better font display than windows. It is possible that all the Chinese methods used are outdated.
In fact, this knowledge has been discussed much in linuxforum. The xft configuration file is/etc/Xfconfig. You can take a look at it to learn about it. For details, you can find it online. Gnome2/gtk2 uses the xft font to set the environment variable GDK_USE_XFT = 1 and Qt to set QT_XFT = 1. In the redhat test version, the environment variable GDK_USE_XFT = 1 is set, and Xftconfig can be set to antialias to false within a certain range, so that small font lattice and large font AA can be achieved. However, I didn't have gnome2 in my hand, but I used zysong18030 when I installed kde3, and I didn't use truetype embedded with dot matrix, so I didn't have any practical experience. However, mozilla can use freetype to achieve this effect, and gnome2 should also be able.
Mozilla has nothing to do with xft. You need to set your own configuration file as follows:
Install the fully-installed version of mozilla (not supported by rpm) and modify the mozilla directory default/pref/unix. js, find pref ("font. freeType2.enable ", false), change the value to true, and set the font directory, for example, pref (" font. directory. truetype.1 ","/usr/share/fonts/truetype "); other settings about aa. In the future, you can find the ZYEC-simsun font in the preference font settings to see its display effect.
However, it still has a major disadvantage. It cannot be implemented in bold or italic, because the Chinese is not actually in bold or italic, but the standard body. I don't know how xft2 works.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service