\u547d\u4ee4<\/a>\uff1amkfontscale;mkfontdir;fc-cache\u3002<\/p>\n\u4e00\u3001\u67e5\u770b\u7cfb\u7edf\u5b57\u4f53<\/p>\n
\u5728\u5f00\u59cb\u5b89\u88c5\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u67e5\u770b\u7cfb\u7edf\u4e2d\u65e9\u5df2\u5b89\u88c5\u7684\u5b57\u4f53\u3002<\/p>\n
\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u65e9\u5df2\u5b89\u88c5\u7684\u5b57\u4f53\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528fc-list\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\u3002\u82e5\u679c\u7cfb\u7edf\u4e2d\u6ca1\u6709\u8be5\u547d\u4ee4\u7684\u8bdd\uff0c\u6211\u4eec\u987b\u8981\u5148\u5b89\u88c5\u76f8\u5173\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n
\u67e5\u770b\u7cfb\u7edf\u7c7b\u578b\uff1acat\/etc\/issue<\/p>\n
\u5728centos\u4e0a\uff0c\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n
yuminstall-yfontconfigmkfontscale<\/p>\n
\u5728ubuntu\u4e0alinux\u64cd\u4f5c\u7cfb\u7edf\u5b89\u88c5\u4eff\u5b8b\u5b57\u4f53<\/strong>\uff0c\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\nsudoapt-get-yinstallfontconfigxfonts-utils<\/p>\n
\u67e5\u770b\u7cfb\u7edf\u9ed8\u8ba4\u5b57\u4f53\uff1afc-list<\/p>\n
\u5047\u5982\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u65e9\u5df2\u5b89\u88c5\u7684\u82f1\u6587\u5b57\u4f53\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1afc-list:lang=zh<\/p>\n
\u6309\u7167\u63d0\u793a\u5b89\u88c5\u76f8\u5173\u7684\u4f9d\u8d56\u5305<\/p>\n
\n
yum install -<\/span>y libX11 libXext libXrender libjpeg xorg-x11-fonts-75dpi xorg-x11-fonts-Type1\n<\/code><\/pre>\n<\/p>\n\u4e8c\u3001\u5b89\u88c5\u5b57\u4f53<\/p>\n
\u4e0a\u4f20\u5b57\u4f53\u6587\u4ef6\u5230\/usr\/share\/fonts\/chinese<\/p>\n
\u4e4b\u540e\u6267\u884c\u5b57\u4f53\u7f13\u5b58\u66f4\u65b0<\/p>\n
<\/p>\n
\n
[root@shigj fonts]<\/span># cd \/usr\/share\/fonts\/chinese<\/span>\n[root@shigj fonts]<\/span># mkfontscale<\/span>\n[root@shigj fonts]<\/span># mkfontdir<\/span>\n[root@shigj fonts]<\/span># fc-cache -fv <\/span>\n\/<\/span>usr\/share\/fonts: caching,<\/span> new cache contents: 2 fonts,<\/span> 0 dirs\n\/<\/span>usr\/share\/X11\/fonts\/Type1: skipping,<\/span> no such directory\n\/<\/span>usr\/share\/X11\/fonts\/TTF: skipping,<\/span> no such directory\n\/<\/span>usr\/local\/share\/fonts: skipping,<\/span> no such directory\n\/<\/span>root\/.<\/span>fonts: skipping,<\/span> no such directory\n\/<\/span>var<\/span>\/<\/span>cache\/fontconfig: cleaning cache directory\n\/<\/span>root\/.<\/span>fontconfig: not cleaning non-existent cache directory\nfc<\/span>-<\/span>cache: succeeded\nfc<\/span>-<\/span>cache -<\/span>fv\n<\/code><\/pre>\n<\/p>\n\u4e09\u3001\u68c0\u6d4blinux\u4e0a\u5b89\u88c5\u7684\u82f1\u6587\u5b57\u4f53<\/p>\n
\n
[root@webadmin01 chinese]<\/span># fc-list :lang=zh-cn<\/span>\n\/<\/span>usr\/share\/fonts\/chinese\/youyuan.<\/span>TTF: YouYuan:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: STSong:style=Regular,<\/span>Normaali\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti TC,<\/span>\u5b8b\u4f53-<\/span>\u7e41,<\/span>\u5b8b\u9ad4-<\/span>\u7e41:style=Regular,<\/span>\u5e38\u89c4\u4f53,<\/span>\u6a19\u6e96\u9ad4\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti SC<\/span>,<\/span>\u5b8b\u4f53-<\/span>\u7b80,<\/span>\u5b8b\u9ad4-<\/span>\u7c21:style=Regular,<\/span>\u5e38\u89c4\u4f53,<\/span>\u6a19\u6e96\u9ad4\n\/<\/span>usr\/share\/fonts\/chinese\/MSYH.<\/span>TTC: Microsoft YaHei:style=Normal\n\/<\/span>usr\/share\/fonts\/chinese\/SIMSUN.<\/span>TTC: SimSun,<\/span>\u5b8b\u4f53:style=Regular,<\/span>\u5e38\u89c4\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti SC<\/span>,<\/span>\u5b8b\u4f53-<\/span>\u7b80,<\/span>\u5b8b\u9ad4-<\/span>\u7c21:style=Light,<\/span>\u7ec6\u4f53,<\/span>\u7d30\u9ad4\n\/<\/span>usr\/share\/fonts\/chinese\/MSYHBD.<\/span>TTC: Microsoft YaHei:style=\u0388\u03bd\u03c4\u03bf\u03bd\u03b1\n\/<\/span>usr\/share\/fonts\/chinese\/STKAITI.<\/span>TTF: STKaiti:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti TC,<\/span>\u5b8b\u4f53-<\/span>\u7e41,<\/span>\u5b8b\u9ad4-<\/span>\u7e41:style=Light,<\/span>\u7ec6\u4f53,<\/span>\u7d30\u9ad4\n<\/p>\n\/<\/span>usr\/share\/fonts\/chinese\/MSYH.<\/span>TTC: Microsoft YaHei UI:style=Normal\n\/<\/span>usr\/share\/fonts\/chinese\/\u96b6\u4e66.<\/span>ttf: LiSu:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/MSYHBD.<\/span>TTC: Microsoft YaHei UI:style=\u0388\u03bd\u03c4\u03bf\u03bd\u03b1\n\/<\/span>usr\/share\/fonts\/chinese\/STFANGSO.<\/span>TTF: STFangsong:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/SIMSUN.<\/span>TTC: NSimSun,<\/span>\u65b0\u5b8b\u4f53:style=Regular,<\/span>\u5e38\u89c4\n\/<\/span>usr\/share\/fonts\/chinese\/MSYHL.<\/span>TTC: Microsoft YaHei UI,<\/span>Microsoft YaHei UI Light:style=Light,<\/span>Regular\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti SC<\/span>:style=Black\n\/<\/span>usr\/share\/fonts\/chinese\/SIMKAI.<\/span>TTF: KaiTi:style=Regular,<\/span>Normaali\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti SC<\/span>,<\/span>\u5b8b\u4f53-<\/span>\u7b80,<\/span>\u5b8b\u9ad4-<\/span>\u7c21:style=Bold,<\/span>\u7c97\u4f53,<\/span>\u7c97\u9ad4\n\/<\/span>usr\/share\/fonts\/chinese\/Songti.<\/span>ttc: Songti TC,<\/span>\u5b8b\u4f53-<\/span>\u7e41,<\/span>\u5b8b\u9ad4-<\/span>\u7e41:style=Bold,<\/span>\u7c97\u4f53,<\/span>\u7c97\u9ad4\n\/<\/span>usr\/share\/fonts\/chinese\/STSONG.<\/span>TTF: STSong:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/\u4eff\u5b8b_GB2312.<\/span>ttf: FangSong_GB2312:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/SIMHEI.<\/span>TTF: SimHei:style=Normal\n\/<\/span>usr\/share\/fonts\/chinese\/\u6977\u4f53_GB2312.<\/span>ttf: KaiTi_GB2312:style=Regular\n\/<\/span>usr\/share\/fonts\/chinese\/SIMFANG.<\/span>TTF: FangSong:style=Regular,<\/span>Normaali\n\/<\/span>usr\/share\/fonts\/chinese\/MSYHL.<\/span>TTC: Microsoft YaHei,<\/span>Microsoft YaHei Light:style=Light,<\/span>Regular\n<\/code><\/pre>\n<\/p>\n\u68c0\u6d4b\u80fd\u591f\u89e3\u6790\u82f1\u6587\u5b57\u4f53\u540d<\/p>\n
\n
for<\/span> family in \u5fae\u8f6f\u96c5\u9ed1 \u5b8b\u4f53 \u9ed1\u4f53 \u4eff\u5b8b \u4eff\u5b8b_GB2312 \u6977\u4f53 \u6977\u4f53_GB2312 \u96b6\u4e66 \u5e7c\u5706;<\/span> do<\/span> echo<\/span> -<\/span>n \"$family<\/span>: \"<\/span>;<\/span> fc<\/span>-match<\/span> \"$family<\/span>\"<\/span>;<\/span> done\n<\/code><\/pre>\n<\/p>\n\u53d1\u89c9\u4e0d\u80fd\u6b63\u5e38\u89e3\u6790<\/p>\n
\n
[root@webadmin01 chinese]<\/span># for family in \u5fae\u8f6f\u96c5\u9ed1 \u5b8b\u4f53 \u9ed1\u4f53 \u4eff\u5b8b \u4eff\u5b8b_GB2312 \u6977\u4f53 \u6977\u4f53_GB2312 \u96b6\u4e66 \u5e7c\u5706; do echo -n \"$family: \"; fc-match \"$family\"; done<\/span>\n\u5fae\u8f6f\u96c5\u9ed1: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u5b8b\u4f53: SIMSUN.<\/span>TTC: \"SimSun\"<\/span> \"Regular\"<\/span>\n\u9ed1\u4f53: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u4eff\u5b8b: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u4eff\u5b8b_GB2312: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u6977\u4f53: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u6977\u4f53_GB2312: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u96b6\u4e66: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n\u5e7c\u5706: DejaVuSans.<\/span>ttf: \"DejaVu Sans\"<\/span> \"Book\"<\/span>\n<\/code><\/pre>\n<\/p>\n\u56db\u3001\u914d\u7f6e\u522b\u79f0<\/p>\n
vim\/etc\/fonts\/fonts.conf<\/p>\n
\u5728\u914d\u7f6e\u8282\u4e4b\u95f4\u964d\u4f4e\u4ee5\u4e0bmatch\u6807\u7b7elinux\u64cd\u4f5c\u7cfb\u7edf\u8bba\u6587\uff0c\u964d\u4f4e\u82f1\u6587\u5b57\u4f53\u89e3\u6790\u89c4\u5219\u3002<\/p>\n
\n
<!<\/span>--<\/span> \u4e3a\u5fae\u8f6f\u96c5\u9ed1 \u5b8b\u4f53 \u9ed1\u4f53 \u4eff\u5b8b \u4eff\u5b8b_GB2312 \u6977\u4f53 \u6977\u4f53_GB2312 \u96b6\u4e66 \u5e7c\u5706;<\/span>\u914d\u7f6e\u522b\u540d --<\/span>>\n \n <test name=\"family\"<\/span>>\u5fae\u8f6f\u96c5\u9ed1<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n Microsoft YaHei<\/<\/span>string>\n <\/<\/span>edit>\n <\/<\/span>match>\n \n <test name=\"family\"<\/span>>\u5b8b\u4f53<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n SimSun<\/<\/span>string>\n <\/<\/span>edit>\n <\/<\/span>match>\n \n <test name=\"family\"<\/span>>\u9ed1\u4f53<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n SimHei<\/<\/span>string>\n <\/<\/span>edit>\n <\/<\/span>match>\n \n <test name=\"family\"<\/span>>\u4eff\u5b8b<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n FangSong<\/<\/span>string>\n <\/<\/span>edit>\n <\/<\/span>match>\n \n <test name=\"family\"<\/span>>\u4eff\u5b8b_GB2312<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n FangSong_GB2312<\/<\/span>string>\n <\/<\/span>edit>\n <\/<\/span>match>\n \n <test name=\"family\"<\/span>>\u6977\u4f53<\/<\/span>string><\/<\/span>test>\n <edit name=\"family\"<\/span> mode=\"assign\"<\/span> binding=\"strong\"<\/span>>\n KaiTi<\/<\/span>string>\n <\/<\/span>edit>\n <