中文亂碼與字體庫windows


設置中文后,查看圖形有亂碼,文字變成了方塊


Win+R打開運行,輸入fonts,回車進入Windows字體目錄,找到微軟雅黑-常規字體,復制出來將文件名修改為msyh.ttf,注意后綴ttf。

將msyh.ttf上傳到服務器zabbix字體目錄中:

/usr/share/zabbix/fonts/

修改配置文件

復制代碼
查看字體配置# grep FONT_NAME /usr/share/zabbix/include/defines.inc.php  -n
45:define('ZBX_GRAPH_FONT_NAME',        'graphfont'); // font file name
93:define('ZBX_FONT_NAME', 'graphfont');
確認字體名稱是否可以替換
# grep graphfont /usr/share/zabbix/include/defines.inc.php  -n
45:define('ZBX_GRAPH_FONT_NAME',        'graphfont'); // font file name
93:define('ZBX_FONT_NAME', 'graphfont');
執行快捷替換
# sed -i "s/graphfont/msyh/g" /usr/share/zabbix/include/defines.inc.php
確認是否替換成功
# grep FONT_NAME /usr/share/zabbix/include/defines.inc.php  -n
45:define('ZBX_GRAPH_FONT_NAME',        'msyh'); // font file name
93:define('ZBX_FONT_NAME', 'msyh');


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM