Linux下Opera字体设置

来源:互联网 发布:app内测平台系统源码 编辑:程序博客网 时间:2024/04/27 16:25

    Opera是一款非常不错的浏览器,小巧快捷Windows和Linux下都有相应的发行版,最新版本是10.0。在Linux下使用Opera浏览中文页面时经常会发生字体混乱的问题。具体来说就是在一行中文中大部分都是宋体但是有时会蹦出来几个楷体字而且字号偏小显示模糊。
    这一问题的产生和Opera的字体调用机制有关,解决起来也不难。Linux下Opera的字体配置文件是目录/usr/share/opera/defaults下的font.ini文件,用VI编辑器打开该文件,找到“Know fonts that solves specific problems”项,修改包含“chinese-s good try-first”的条目如下family:WenQuanYi Bitmap Song=chinese-s good try-first,如果使用微软的SimSun字体(最好不要用,一面惹上官司)相应的将WenQuanYi Bitmap Song替换为SimSun即可。 而后将上下的japanese和korean条目注释掉。
完成上述修改后,重启Opera即可。

 


; Generic settings - families with known glyph types
family:times|nimbus roman no9 l|times new roman|bitstream vera serif=serif
family:helvetica|nimbus sans l|arial|bitstream vera sans=sans-serif
family:courier|courier new|bitstream vera sans mono=monospace

; Generic settings - generic families which have good, readable designs,
; but where we can't be sure the implementation is any good.

family:times|times new roman=good
family:helvetica|arial=good
family:courier|courier new=good
family:clearlyu *=good


; Known high-quality fonts
family:arial|verdana|times new roman;foundry:microsoft|monotype=excellent
family:Nimbus*=verygood
foundry:bitstream=excellent

; Known fonts that solves specific problems

; Chinese fonts

family:Simsun|FZSongTi|新宋体|宋体|方正宋体|文泉驿正黑|文泉驛正黑|WenQuanYi Zen Hei=chinese-s excellent try-first
family:WenQuanYi Bitmap Song=chinese-s verygood try-first
family:文鼎PL简报宋|AR PL UMing*|AR PL SungtiL GB=chinese-s good try-first


//将下面这些注释掉就可以了

; Japanese fonts
;family:IPA*=japanese excellent try-first
;family:kochi*=japanese good try-first
;family:VL*=japanese verygood try-first


; Korean fonts
;family:baekmuk gulim|undotum=korean sans-serif excellent try-first
;family:baekmuk batang|unbatang=korean serif verygood
;family:baekmuk dotum=korean sans-serif good
;family:ungungseo|unshinmun=korean serif good
;family:baekmuk*|un*=korean