1. The fonts that need to be installed are as follows
(1).
yum install bitmap-fonts bitmap-fonts-cjk
(2).
wget http://www.my-guides.net/en/images/stories/fedora12/msttcore-fonts-2.0 -3.noarch.rpm
rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm
(3).
Microsoft font
msyhbd.ttf
msyh.ttf
simsun.ttc The
installation method is as follows:
Upload the font to the directory: /usr/share/ fonts/chinese/TrueType
execute the following command:
#mkfontscale
#mkfontdir
#fc-cache -fv
to make the font take effect
#source /etc/profile
Notes:
# mkfontscale (If it prompts mkfontscale: command not found, you need to install it by yourself # yum install mkfontscale )
# mkfontdir
# fc-cache -fv (if it prompts fc-cache: command not found, you need to install # yum install fontconfig )
2. Check the system locale
Check the system: vi /etc/profile
if it exists
export LC_ALL="zh_CN.UTF-8 " It
needs to be changed to
export LC_ALL="en_US.UTF-8" The
specific reason is not clear, but only in this way, the Microsoft Yahei font will take effect, and no garbled blocks will be generated.
Linux Check the font installation command:
fc-list :lang=zh
Production environment solution for phantomjs garbled problem
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=327097245&siteId=291194637
Recommended
Ranking