centos7 cacti in the weathmap lable Chinese garbage problem

First under: To display Chinese, the local field which must have Chinese fonts, newly installed linux is not installed library field, and the corresponding font. Below msyh.ttf font example to illustrate.
1, fc-list view font library
2, yum -y install fontconfig installation
3, more than two directories and fontconfig fonts installed after the / usr at / share directory

4, first create a new directory chinese in / usr / shared under / fonts directory

Here seemingly only support msyh.ttf font, font other copy did not succeed, which will probably face black.
5, to C: \ fonts you need to upload at Windows \ Fonts directory under / usr / shared / fonts / chinese directory

6, chinese modify permission: chmod -R 755 / usr / share / fonts / chinese

7, the next step is to install ttmkfdir to search for all font information directory and generate summary fonts.scale file,
enter the command: yum -y install ttmkfdir

In fact, do not do this step are OK too, they can try a look, I myself did not succeed
8, the last step is to modify the font configuration file, first open the configuration file editor:

we /etc/fonts/fonts.conf

<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<dir>/usr/share/fonts/chinese<dir> <!-- 这里是重点 -->
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>

9, fc-cache refresh

10, fc-list you can see just the configuration
----------------

Into the corresponding modification under weathmap the configs files, fonts, and the path to consistent

Profile settings:
#Automatically Generated by PHP-Weathermap v0.98a
FONTDEFINE 100 /usr/share/fonts/chinese/msyh.ttf 10
#End of Global sectionTop

TEMPLATE-only NODES #:
NODE the DEFAULT
labelFont 100 # here define the font must be written, or otherwise garbled
MAXVALUE 100
# TEMPLATE-only LINKs:

#regular NODEs:
NODE node07372
LABEL 测试
POSITION 360 131

#regular LINKs:

#That's All Folks!

By entering web cacti, modify the path.
centos7 cacti in the weathmap lable Chinese garbage problemcentos7 cacti in the weathmap lable Chinese garbage problem

Guess you like

Origin blog.51cto.com/9840752/2435801