在 Linux 中獲得漂亮字體渲染的最佳、最簡單的方法是什麼?
目前,我遇到了又細又難看的字體(如下圖)。我浪費了太多時間調整fonts.conf
,但還沒有找到合適的組合。
我在 Macbook Pro (OS X 10.7.4) 上的虛擬機器中執行 Debian 6.0,沒有桌面環境(只是用於視窗管理器的 Openbox)。
截圖
以下螢幕截圖是在沒有進行調整的情況下拍攝fonts.conf
的.Xdefaults
。
在「本機」Openbox 環境中運作:
跑在X11上,看起來比Openbox差一點:
答案1
我肯定更喜歡當前的渲染,但如果您喜歡更粗、更模糊和邊緣有顏色的字體,您應該停用提示,啟用子像素渲染並保持啟用抗鋸齒功能。更好的解決方案是僅使用更粗的字體,但這寧願看起來像書上印刷的那樣清晰而不是模糊。所以這取決於你所說的「平滑」是什麼意思。
閱讀有關提示的更多資訊(並查看漂亮的比較螢幕截圖)http://en.wikipedia.org/wiki/Font_hinting
答案2
./configure script
在資料夾中運行後emacs
,您可能會在輸出末尾附近看到類似以下內容:
Where should the build process find the source code? .
What compiler should emacs be built with? gcc -g3 -O2
Should Emacs use the GNU version of malloc? yes
(Using Doug Lea's new malloc from the GNU C Library.)
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? no
What window system should Emacs use? x11
What toolkit should Emacs use? LUCID
Where do we find X Windows header files? Standard dirs
Where do we find X Windows libraries? Standard dirs
Does Emacs use -lXaw3d? yes
Does Emacs use -lXpm? yes
Does Emacs use -ljpeg? yes
Does Emacs use -ltiff? yes
Does Emacs use a gif library? yes -lgif
Does Emacs use a png library? yes -lpng12
Does Emacs use -lrsvg-2? no
Does Emacs use cairo? no
Does Emacs use imagemagick? no
Does Emacs support sound? yes
Does Emacs use -lgpm? yes
Does Emacs use -ldbus? yes
Does Emacs use -lgconf? no
Does Emacs use GSettings? no
Does Emacs use a file notification library? yes -lglibc (inotify)
Does Emacs use access control lists? yes -lacl
Does Emacs use -lselinux? yes
Does Emacs use -lgnutls? no
Does Emacs use -lxml2? no
Does Emacs use -lfreetype? no
Does Emacs use -lm17n-flt? no
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs directly use zlib? yes
Does Emacs have dynamic modules support? no
Does Emacs use toolkit scroll bars? yes
Does Emacs support Xwidgets (requires gtk3)? no
-lfreetype
請注意,在和之後它說“不” -lxft
。如果安裝這些庫,emacs
應該使用正確的字體:
sudo apt-get install libfreetype6-dev libxft-dev
您可以對您收到的大多數其他“否”做同樣的事情。安裝所需的庫後,./configure
再次運行,然後make
和sudo make install
。