个人工具

“Firefox 字体”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: =Firefox程序的中文配置= 本文作者:aBiNg '''声明:本文更适用于,在Firefox首选项中无法设定中文字体的情况!''' 依据:firefox官方doc Much of Moz...)
 
第1行: 第1行:
=Firefox程序的中文配置=
+
<h1>Firefox程序的中文配置</h1>
本文作者:aBiNg
+
<p>本文作者:aBiNg
 
+
</p><p><b>声明:本文更适用于,在Firefox首选项中无法设定中文字体的情况!</b>
'''声明:本文更适用于,在Firefox首选项中无法设定中文字体的情况!'''
+
</p><p>依据:firefox官方doc
 
+
</p>
依据:firefox官方doc
+
<pre class="_fck_mw_lspace">Much of Mozilla's fonts and colors are controlled via CSS (Cascading Style Sheets).
Much of Mozilla's fonts and colors are controlled via CSS (Cascading Style Sheets).
+
These are set in .css files in Mozilla's chrome directories, but the user can override them with two plain text files, called userContent.css and userChrome.css.
These are set in .css files in Mozilla's chrome directories, but the user can override them with two plain text files, called userContent.css and userChrome.css.
+
</pre>
 
+
<h2>建立*.css文件</h2>
==建立*.css文件==
+
<pre class="_fck_mw_lspace">cd ~/.mozilla/firefox/*.default/chrome
cd ~/.mozilla/firefox/*.default/chrome
+
cp userChrome-example.css userChrome.css
cp userChrome-example.css userChrome.css
+
cp userContent-example.css userContent.css
cp userContent-example.css userContent.css
+
</pre>
 
+
<h2>写入配置</h2>
==写入配置==
+
<h3>userChrome.css</h3>
===userChrome.css===
+
<p>将下面这段代码加入到userChrome.css文件後面:
将下面这段代码加入到userChrome.css文件后面:
+
</p>
* {
+
<pre class="_fck_mw_lspace">* {
  font-size: 9pt !important;
+
  font-size: 9pt&nbsp;!important;
  font-family: 微软雅黑 !important;
+
  font-family: wenquanyi bitmap song&nbsp;!important;
}
+
}
Note:那“微软雅黑"是自己设定的。正确的字体名称很重要。在文件浏览器(例如nautilus,ctrl+L,调出路径)中输入fonts://,查看字体属性,name一栏的就是。  
+
</pre>
 
+
<p>Note:那“wenquanyi bitmap song"是自己设定的。正确的字体名称很重要。在文件浏览器(例如nautilus,ctrl+L,调出路径)中输入fonts://,查看字体属性,name一栏的就是。  
上面代码中的通配符(*),包括了bookmarks和tabs字体。  
+
</p><p>上面代码中的通配符(*),包括了bookmarks和tabs字体。  
 
+
</p>
===userContent.css===
+
<h3>userContent.css</h3>
将下面这段代码加入到userChrome.css文件后面:
+
<p>将下面这段代码加入到userChrome.css文件後面:
* {
+
</p>
  font-size: 9pt !important;
+
<pre class="_fck_mw_lspace">* {
  font-family: 微软雅黑 !important;
+
  font-size: 9pt&nbsp;!important;
}
+
  font-family: wenquanyi bitmap song&nbsp;!important;
 
+
}
Note:同上。
+
</pre>
 
+
<p>Note:同上。
重启Firefox,检验效果。
+
</p><p>重启Firefox,检验效果。
 +
</p>
  
 
=提示=
 
=提示=

2007年12月28日 (五) 16:55的版本

Firefox程序的中文配置

本文作者:aBiNg

声明:本文更适用于,在Firefox首选项中无法设定中文字体的情况!

依据:firefox官方doc

Much of Mozilla's fonts and colors are controlled via CSS (Cascading Style Sheets).
These are set in .css files in Mozilla's chrome directories, but the user can override them with two plain text files, called userContent.css and userChrome.css.

建立*.css文件

cd ~/.mozilla/firefox/*.default/chrome
cp userChrome-example.css userChrome.css
cp userContent-example.css userContent.css

写入配置

userChrome.css

将下面这段代码加入到userChrome.css文件後面:

* {
  font-size: 9pt !important;
  font-family: wenquanyi bitmap song !important;
}

Note:那“wenquanyi bitmap song"是自己设定的。正确的字体名称很重要。在文件浏览器(例如nautilus,ctrl+L,调出路径)中输入fonts://,查看字体属性,name一栏的就是。

上面代码中的通配符(*),包括了bookmarks和tabs字体。

userContent.css

将下面这段代码加入到userChrome.css文件後面:

* {
  font-size: 9pt !important;
  font-family: wenquanyi bitmap song !important;
}

Note:同上。

重启Firefox,检验效果。

提示

1)浏览器的preferences中的fonts类型设置,默认就行。请允许页面选择自己的字体,这也是默认的。调整好最小字体大小。

2)1024x768的dpi(gnome的在字体设置的details里面),最好设置为90左右。gnome程序界面字体大小,请自行调整。别的分辨率的dpi,请google。

3)通配符未免一棒打死,失去了页面的多样性。深入些的,请查看官方css自定义帮助