OS:Ubuntu9.10
Opera version:10.10
Opera是一款非常不错的浏览器,小巧快捷Windows和Linux下都有相应的发行版。在Linux下使用Opera浏览中文页 面时经常会发生字体混乱的问题。具体来说就是在一行中文中大部分都是宋体但是有时会蹦出来几个楷体字而且字号偏小显示模糊。 这一问题的产生和Opera的字体调用机制有关,解决起来也不难。 Linux下Opera的字体配置文件是目录/usr/share/opera/defaults下的font.ini文件,用gedit编辑器打开该文件,在配置文件中找到:
; Known fonts that solves specific problems
family:mincho|gothic = japanese good try-first
family:kochi* =japanese good try-first
family:baekmuk* =korean good try-first
family:mincho|gothic = japanese good try-first
family:kochi* =japanese good try-first
family:baekmuk* =korean good try-first
全部注释掉,用下面的内容替换:
; Known fonts that solves specific problems
family:Simsun|FZSongTi = chinese-s excellent try-first
family:WenQuanYi Bitmap Song = chinese-s verygood try-first
family:AR PL UMing* =chinese-s good try-first
family:Simsun|FZSongTi = chinese-s excellent try-first
family:WenQuanYi Bitmap Song = chinese-s verygood try-first
family:AR PL UMing* =chinese-s good try-first
重新启动浏览器,即可!
附:
/usr/share/opera/defaults/font.ini
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1
Opera Preferences version
2.1
2 ; Do not edit this file while Opera is running
3 ; This file is stored in UTF-8 encoding
4
5
6 [ matches ]
7
8 ; One can disable xft or core fonts if necessary
9 ; Please note that "Enable Core X Fonts" set to 0 in operaprefs.ini
10 ; will prevent reading x11 core fonts all together. That value is default
11 ; if opera 10.
12 ; engine:xft=blacklist
13 ; engine:x11=blacklist
14
15 ; Foundries that are generally known to have bad implementations
16 ; foundry:urw|abiword|ultimo=bad
17
18 ; Generic settings - families with known glyph types
19 family:times|nimbus roman no9 l|times new roman|bitstream vera serif = serif
20 family:helvetica|nimbus sans l|arial|bitstream vera sans = sans-serif
21 family:courier|courier new|bitstream vera sans mono = monospace
22
23 ; Generic settings - generic families which have good, readable designs,
24 ; but where we can't be sure the implementation is any good.
25 family:times|times new roman = good
26 family:helvetica|arial = good
27 family:courier|courier new = good
28 family:clearlyu * = good
29
30 ; Known high-quality fonts
31 family:arial|verdana|times new roman ; foundry:microsoft|monotype=excellent
32 family:Nimbus* = verygood
33 foundry:bitstream = excellent
34
35 ; Known fonts that solves specific problems
36
37 ; Chinese fonts
38 ; family:Simsun|FZSongTi|新宋体|宋体|方正宋体|文泉驿正黑|文泉驛正黑|WenQuanYi Zen Hei=chinese-s excellent try-first
39 family:Simsun|FZSongTi = chinese-s excellent try-first ; added by myself
40 family:WenQuanYi Bitmap Song = chinese-s verygood try-first
41 ; family:文鼎PL简报宋|AR PL UMing*|AR PL SungtiL GB=chinese-s good try-first
42 family:AR PL UMing* = chinese-s good try-first ; added by myself
43
44 ; Japanese fonts
45 ; family:IPA*=japanese excellent try-first
46 ; family:kochi*=japanese good try-first
47 ; family:VL*=japanese verygood try-first
48
49
50 ; Korean fonts
51 ; family:baekmuk gulim|undotum=korean sans-serif excellent try-first
52 ; family:baekmuk batang|unbatang=korean serif verygood
53 ; family:baekmuk dotum=korean sans-serif good
54 ; family:ungungseo|unshinmun=korean serif good
55 ; family:baekmuk*|un*=korean
56 ; Optional Korean blacklist
57 ; family:bandal|bangwool|guseul|eunjin*=blacklist
58
59
60 ; Fonts that we know should not be used for displaying text
61 family:*dingbat*|*dings*|agathadaimon = symbol
62
63 ; Specific fonts at the bottom
64 ; Known bad implementations
65 engine:x11 ; foundry:mdk;family:helvetica=blacklist
66 engine:xft ; foundry:adobe;family:helvetica=blacklist
67
68
69 [ default ]
70 usage = by-request
71 preference = 5
72
73 [ serif ]
74 style = serif
75
76 [ sans-serif ]
77 style = sans-serif
78
79 [ monospace ]
80 style = monospace
81
82 [ cursive ]
83 style = cursive
84
85 [ fantasy ]
86 style = fantasy
87
88 ; [japanese]
89 ; style=japanese
90
91 [ chinese-t ]
92 style = chinese-t
93
94 [ chinese-s ]
95 style = chinese-s
96
97 ; [korean]
98 ; style=korean
99
100 [ try-first ]
101 usage = try-first
102
103 [ excellent ]
104 preference = 8
105 usage = try-first
106
107 [ verygood ]
108 preference = 7
109 usage = try-first
110
111 [ good ]
112 preference = 6
113
114 [ bad ]
115 preference = 4
116
117 [ avoid ]
118 usage = by-request
119
120 [ symbol ]
121 usage = by-request
122
123 [ blacklist ]
124 usage = blacklist
125
2 ; Do not edit this file while Opera is running
3 ; This file is stored in UTF-8 encoding
4
5
6 [ matches ]
7
8 ; One can disable xft or core fonts if necessary
9 ; Please note that "Enable Core X Fonts" set to 0 in operaprefs.ini
10 ; will prevent reading x11 core fonts all together. That value is default
11 ; if opera 10.
12 ; engine:xft=blacklist
13 ; engine:x11=blacklist
14
15 ; Foundries that are generally known to have bad implementations
16 ; foundry:urw|abiword|ultimo=bad
17
18 ; Generic settings - families with known glyph types
19 family:times|nimbus roman no9 l|times new roman|bitstream vera serif = serif
20 family:helvetica|nimbus sans l|arial|bitstream vera sans = sans-serif
21 family:courier|courier new|bitstream vera sans mono = monospace
22
23 ; Generic settings - generic families which have good, readable designs,
24 ; but where we can't be sure the implementation is any good.
25 family:times|times new roman = good
26 family:helvetica|arial = good
27 family:courier|courier new = good
28 family:clearlyu * = good
29
30 ; Known high-quality fonts
31 family:arial|verdana|times new roman ; foundry:microsoft|monotype=excellent
32 family:Nimbus* = verygood
33 foundry:bitstream = excellent
34
35 ; Known fonts that solves specific problems
36
37 ; Chinese fonts
38 ; family:Simsun|FZSongTi|新宋体|宋体|方正宋体|文泉驿正黑|文泉驛正黑|WenQuanYi Zen Hei=chinese-s excellent try-first
39 family:Simsun|FZSongTi = chinese-s excellent try-first ; added by myself
40 family:WenQuanYi Bitmap Song = chinese-s verygood try-first
41 ; family:文鼎PL简报宋|AR PL UMing*|AR PL SungtiL GB=chinese-s good try-first
42 family:AR PL UMing* = chinese-s good try-first ; added by myself
43
44 ; Japanese fonts
45 ; family:IPA*=japanese excellent try-first
46 ; family:kochi*=japanese good try-first
47 ; family:VL*=japanese verygood try-first
48
49
50 ; Korean fonts
51 ; family:baekmuk gulim|undotum=korean sans-serif excellent try-first
52 ; family:baekmuk batang|unbatang=korean serif verygood
53 ; family:baekmuk dotum=korean sans-serif good
54 ; family:ungungseo|unshinmun=korean serif good
55 ; family:baekmuk*|un*=korean
56 ; Optional Korean blacklist
57 ; family:bandal|bangwool|guseul|eunjin*=blacklist
58
59
60 ; Fonts that we know should not be used for displaying text
61 family:*dingbat*|*dings*|agathadaimon = symbol
62
63 ; Specific fonts at the bottom
64 ; Known bad implementations
65 engine:x11 ; foundry:mdk;family:helvetica=blacklist
66 engine:xft ; foundry:adobe;family:helvetica=blacklist
67
68
69 [ default ]
70 usage = by-request
71 preference = 5
72
73 [ serif ]
74 style = serif
75
76 [ sans-serif ]
77 style = sans-serif
78
79 [ monospace ]
80 style = monospace
81
82 [ cursive ]
83 style = cursive
84
85 [ fantasy ]
86 style = fantasy
87
88 ; [japanese]
89 ; style=japanese
90
91 [ chinese-t ]
92 style = chinese-t
93
94 [ chinese-s ]
95 style = chinese-s
96
97 ; [korean]
98 ; style=korean
99
100 [ try-first ]
101 usage = try-first
102
103 [ excellent ]
104 preference = 8
105 usage = try-first
106
107 [ verygood ]
108 preference = 7
109 usage = try-first
110
111 [ good ]
112 preference = 6
113
114 [ bad ]
115 preference = 4
116
117 [ avoid ]
118 usage = by-request
119
120 [ symbol ]
121 usage = by-request
122
123 [ blacklist ]
124 usage = blacklist
125