歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下的Firefox字體配置方案

Ubuntu下的Firefox字體配置方案

日期:2017/2/28 16:54:07   编辑:Linux教程

有關gnome & gtk*的字體配置,在各人機器上總會有些不一。一種配置,適合我;可能並不一定適合別人。軟件本身的說明往往是最有說服力,配置起來也最有效果的吧。這裡也提供一個Ubuntu下的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.

那下面就寫一下最最簡單的一種配置吧。

1、建立*.css

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


2、寫入內容
1)把下面一段attach到userChrome.css後面:

* {
font-size: 9pt !important;
font-family: 微軟雅黑 !important;
}


Note:那“微軟xx"是自己設定的。正確的字體名稱很重要。在文件浏覽器中輸入fonts://,查看字體屬性,name一欄的就是。

上面的通配符,包括了bookmarks和tab字體的顯示。有這方面困惑的朋友不妨一試。

2)把下面一段attach到userContent.css後面:

* {
font-size: 9pt !important;
font-family: 微軟雅黑 !important;
}


Note:同上。

很明顯這是網頁內容的字體設置了。

3、Notes:
1)浏覽器的preference中的font類型設置,默認就行。請允許頁面選擇自己的字體,這也是默認的。調整好最小字體大小。

2)1024x768的dpi(gnome的在字體設置的details裡面),最好設置為90左右。gnome程序界面字體大小,請自行調整。別的分辨率的dpi。

3)通配符未免一棒打死,失去了頁面的多樣性。深入些的,請查看官方css自定義幫助。

Copyright © Linux教程網 All Rights Reserved