![如何使 Debian/Ubuntu 中的字体流畅且易读?](https://linux22.com/image/1317040/%E5%A6%82%E4%BD%95%E4%BD%BF%20Debian%2FUbuntu%20%E4%B8%AD%E7%9A%84%E5%AD%97%E4%BD%93%E6%B5%81%E7%95%85%E4%B8%94%E6%98%93%E8%AF%BB%EF%BC%9F.png)
在 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
注意,在和之后显示 no -lxft
。如果您安装了这些库,emacs
应该使用正确的字体:
sudo apt-get install libfreetype6-dev libxft-dev
您可以对收到的大多数其他错误执行相同的操作。安装所需的库后,./configure
再次运行,然后make
运行sudo make install
。