页面

显示标签为“font”的博文。显示所有博文
显示标签为“font”的博文。显示所有博文

2011-09-06

debian中java字体显示为方框

那是因为java字体配置文件中指定的字体不存在了。在debian中,集中修改这个文件(根据实际情况调整路径):
/etc/java-6-sun/fontconfig.properties
找到这一行:
sequence.allfonts=latin-1,chinese-arphic1
后面的值可能会有变化。简单起见,我首选中文:
sequence.allfonts=chinese-arphic1,latin-1
同样地,再根据locale设置调整具体字体(sequence.allfonts.UTF-8.zh.CN,sequence.allfonts.UTF-8.zh.TW,sequence.allfonts.GBK,等等):
sequence.allfonts.UTF-8.zh.CN=chinese-arphic1,latin-1,chinese-arphic2
然后搜索这个chinese-arphic1,应该有这么个东西:
allfonts.chinese-arphic1=-arphic-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1
其值就是jvm字体名,据此再搜‘-arphic-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1’,找其具体字体文件,应该找到这样一行:
filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal--*-*-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/uming.ttc
我早先把uming.ttc给卸载了,所以该字体根本不存在了。把值改为你想要的字体文件:
filename.-arphic-ar_pl_shanheisun_uni-medium-r-normal--*-*-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc
可以顺便把所有引用了不存在的字体‘/usr/share/fonts/truetype/uming.ttc’的项改掉。
搞定。

2010-01-27

查询已安装字体

$ fc-list

2009-10-19

``No CIDSupplement specified...''字体设置问题

root身份执行:
$ fc-cache -fv 2>&1 | grep failed | cut -f1 -d":" | xargs -i touch {} && fc-cache -fv

2009-05-30

Qt4 Font Twist

Now Qt4 applications' all characters show twisted with WenQuanYi ZengHei or Bitmap font. Change the font with Qt4 Setting to Bitstream Character or WenQuanYi Mono font in order to show letters regularly.

2009-02-02

JRE Fonts Configuration

Edit file:
$JAVA_HOME$/jre/lib/fontconfig.properties
Actually, one may just replace OpenJDK's fontconfig.properties with Sun JRE provided (search fontconfig.properties in file system and copy).