Category Archives: Linux

(转)Firefox 书签高度,字体宽度调整

在 Ubuntu 下用 Firefox 一直覺得畫面很小,觀察一下發現書籤列怎麼佔了那麼多空間,上網查知道原來不只我有這樣的感覺 XD,就參考 Ubuntu Forums 裡的文章把 Firefox 的畫面調整一下。


上面的就是修改完的結果,字體跟書籤列高度都比較小。

方法是修改 userChrome.css,這個檔案在 [Firefox profile]/chrome 目錄裡,沒有的話就新建一個。以下是我 userChrome.css 的內容:
/* Menu Bar – Shrink and Fade Text */
#navigator-toolbox .menubar-text {
font-size: 12px !important;
}

/* URL Bar and Search Bar – Shrink and Fade Text*/
#urlbar, #searchbar{
font-size: 12px !important;
}

/* Tabs – Shrink Font and Height*/
.tabbrowser-tabs {
font-size: 12px !important;
height: 24px !important;
}
.tabbrowser-strip {
height: 26px !important;
}

/* Bookmarks Toolbar – Shrink Font and Size*/
#PersonalToolbar {
font-size: 12px !important;
padding: 0px !important;
margin: 0px !important;
max-height: 24px !important;
}
/* Seperators – Remove */
#PersonalToolbar toolbarseparator {
display: none !important;
}
/* Toolbar Buttons – Reduce Margins */
#PersonalToolbar toolbarbutton {
margin: 0 -5px 0 -1px !important;
}
/* Toolbar Icons – Shrink and Reduce Margins */
#PersonalToolbar .toolbarbutton-icon {
max-width: 12px !important;
max-height: 12px !important;
margin: 0px 2px 0px 0px !important;
}

Ubuntu Firefox 3.5 字体发虚的解决办法

因为firefox 3.5更换了渲染引擎,在升级之后浏览器的字体渲染效果会改变,字体明显加粗。这也是很多人不想升级到3.5的主要原因。但是今天早上欧洲源已经将FF升级到3.5 pre3。。。在google了一番之后终于在ubuntu官方论坛上找到了解决方法:

mentioning that:

Quote:
firefox-3.5 takes its font hinting orders from fontconfig, instead of gnome’s font settings

The question, how do I change fontconfig to use the same font as my gnome’s font settings?

SOLVED1: The following solved the font problem for me:

Code:
cd /etc/fonts/
sudo mv conf.d/10-hinting-slight.conf .
sudo ln -s conf.avail/10-hinting-slight.conf conf.d/
sudo mv conf.d/10-hinting.conf .
sudo ln -s conf.avail/10-hinting.conf conf.d/
sudo dpkg-reconfigure fontconfig

Since the existing hinting files in conf.d are nothing more than soft links to the same filename under ../conf.avail I am assuming that by these commands you are disabling the soft link. I tried the same by renaming the soft link instead of pointing it to elsewhere, as you have done, but the browser still renders the fonts like before.

SOLVED2:

I managed to get subpixel smoothing working, I created a file in my home directory called “.fonts.conf” and put this in it:

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

Something to keep in mind is that I’m using full smoothing, not medium or slight so your settings may be different.

PDF读取软件

ubuntu下常用的PDF阅读软件有Adobe Reader,Gnome本身带的evince和最新出的foxit reader for linux。当然用Wine的话也可以运行最新的foxit reader 3.0。下面来说说各自的优缺点。

    1. Adobe Reader

    这个算是ubuntu甚至Linux下兼容性最好的pdf reader,可以兼容各种表单,但是体积太大,在linux下运行效率也不是很高,现在最新的是9.1x,速度快了一点,没有中文版本,可以强行安装Asian Font Pack,不过部分Pdf中文显示还是有问题,所以推荐安装中文8.1x或者英文版+Aisan Font Pack。

    2. Evince

    这个是Gnome自带的pdf reader速度很快,缺点是中文显示有问题。解决方法如下(转)

    a) 安装中文字体:sudo apt-get install xpdf-chinese-simplified
    b) 从http://poppler.freedesktop.org/上下载最新的popper-data,现在最新的是0.21。
    c) 下载之后tar xzvf poppler-data-0.2.1.tar.gz解压缩之
    d) 最后直接sudo make install datadir=/usr/share就可以了

    3. Foxit Reader for Linux

    刚出的软件,对中文兼容较好,功能还是太弱,有待观察。

    4. Wine + Foxit 3.0

    速度比较快,但是总有一些小毛病,如果前几种方法都不行的话可以考虑用WINE+foxit reader来看pdf