A机器
[root@hf-01 ~]# vim /usr/share/zabbix/include/defines.inc.php
搜索 /ZBX_FONTPATH 会看到字体所在的相对路径
define('ZBX_FONTPATH', realpath('fonts')); // where to search for font (GD > 2.0.18)
define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
里面的
realpath('fonts')); //这个为zabbix字库所在的路径,使用的路劲是相对路径,相对于/usr/share/zabbix/
'graphfont'); // font file name // 这个为字体的名字
-它定义的路径是“fonts”,它是一个相对路径,绝对路径为/usr/share/zabbix/fonts,而字体文件为“ZBX_GRAPH_FONT_NAME”所定义的“graphfont”,它是一个文件,绝对路径为/usr/share/zabbix/fonts/graphfont 7. 这个目录下的/usr/share/zabbix/fonts/graphfont.ttf文件软链接到了/etc/alternatives/zabbix-web-font文件,而/etc/alternatives/zabbix-web-font文件又软链接到了 /usr/share/fonts/dejavu/DejaVuSans.ttf
[root@hf-01 ~]# ls /usr/share/zabbix/fonts/
graphfont.ttf
[root@hf-01 ~]# ls -l !$
ls -l /usr/share/zabbix/fonts/
总用量 0
lrwxrwxrwx 1 root root 33 1月 3 01:51 graphfont.ttf -> /etc/alternatives/zabbix-web-font
[root@hf-01 ~]# ls -l /etc/alternatives/zabbix-web-font
lrwxrwxrwx 1 root root 38 1月 3 01:51 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
[root@hf-01 ~]#
[root@hf-01 ~]# cd /usr/share/zabbix/fonts/
[root@hf-01 fonts]# ls
graphfont.ttf SIMFANG.TTF
[root@hf-01 fonts]#
[root@hf-01 fonts]# mv graphfont.ttf graphfont.ttf.back
[root@hf-01 fonts]#
[root@hf-01 fonts]# ln -s SIMFANG.TTF graphfont.ttf
[root@hf-01 fonts]# ls -l
总用量 10332
lrwxrwxrwx 1 root root 11 2月 2 06:45 graphfont.ttf -> SIMFANG.TTF
lrwxrwxrwx 1 root root 33 1月 3 01:51 graphfont.ttf.back -> /etc/alternatives/zabbix-web-font
-rw-r--r-- 1 root root 10576012 6月 11 2009 SIMFANG.TTF
[root@hf-01 fonts]#