|
根据自己的经验总结,抛砖引玉。不同的发行版其实指导思想也差不多。
字体——
一、为了实现字体修饰功能,确保带这几个关键字的包装上:fontconfig 、freetype 、Xft 、cairo
Mandirva2009.1(x86_64)里面好像是:lib64xft2、fontconfig、lib64cairo2、freetype
ps:有时候reinstall(--replacepkg)一遍这几个包flash的字体就能显示了,有时不行。
二、查出显示器LCD的真实DPI。
例如我的网上查到我显示器规格DPI点距是0.282mm。1英寸是25.4mm,那么DPI=25.4 / 0.282 = 90;
还有一种方法是那尺子量显示器的宽、高,除以分辨率:宽mm/1680,高mm/1050
写入/etc/X11/xorg.conf- Section "Monitor"
- Option "DPI" "90 x 90"
- EndSection
复制代码 重启,检测方法:终端运行- xdpyinfo | grep resolution
复制代码 ,应该就是你设置的DPI
三、安装字体
LCD推荐用矢量字体,我觉得矢量已经很锐利了,请看附件截图。
当然,点阵也是要的,为了和别人交流。
把字体放到/usr/share/fonts目录下,自己建个目录把costom。弄好了就运行fc-cache -fv刷新字体。
四、开启字体效果
这就是我乱来的,我把openSUSE里的配置文件照搬,然后改了几个false为true。
生成文件/etc/fonts/local.conf或~/.fonts.conf
仅供参考:- <?xml version="1.0"?>
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- <fontconfig>
- <!-- Generated by SuSEconfig.fonts, don't edit, your changes will get lost. -->
- <!-- Edit /etc/sysconfig/fonts-config instead. -->
- <!-- Or put rules into your personal config file ~/.fonts.conf. -->
- <!-- ************************************************************ -->
- <!-- Hinting and antialiasing -->
- <!-- ************************************************************ -->
- <!--
- Using hinting=true, hintstyle=hintfull and antialias=true
- is a good default for most fonts.
- Match on "pattern" for the default, not on "font" to make
- it easier to override the default using FcPatternDel()
- and FcPatternAdd...() (see bugzilla #104365).
- -->
- <match target="pattern">
- <edit name="hinting">
- <bool>true</bool>
- </edit>
- <edit name="hintstyle">
- <const>hintfull</const>
- </edit>
- <edit name="antialias">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- Set autohinter=true as the default, then add exceptions for certain fonts.
- Match on "font" here, not on "pattern" because of bug #118131 comment #93.
- (If an autohint value is set in pattern, OpenOffice 2.1 will use that even
- if there are fontconfig rules matching on "font" which should override it
- again). This doesn't cause any problems for Cairo/Gnome (see bug #104365)
- because Cairo/Gnome don't try to change the autohint value anyway.
- -->
-
- <match target="font">
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- Switch off the autohinter for PostScript fonts (Type 1 and OpenType CFF)
- because using the PostScript hinting usually looks better than using
- the autohinter.
- -->
- <match target="font">
- <test name="fontformat">
- <string>Type 1</string>
- <string>CFF</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- TrueType Fonts which have high quality byte code interpreter
- instructions can look very good in even in small sizes when using
- the byte code interpreter (autohint=false). This is true
- both with and without anti-aliasing.
- In black and white (antialias=false) the results when rendering
- with the byte code interpreter may even look as good as high quality
- bitmap fonts.
- On the other hand, some low quality TrueType Fonts do not have
- byte code interpreter instructions at all or only very bad byte
- code and may look better when the autohinter is used.
- (See "FreeSans" for example, it looks better with the
- autohinter which is especially obvious if anti-aliasing is off).
- -->
- <!--
- Switch off the autohinter for TrueType fonts in order
- to use the byte code interpreter.
- -->
-
- <match target="font">
- <test name="fontformat">
- <string>TrueType</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- Switch on the autohinter for a few TrueType fonts which
- have no byte code or very bad byte code and look better
- with the autohinter:
- But see also bug #215602 for many fonts the autohinter
- seriously distorts the metrics so badly that
- even the digits which should be monospaced are not
- monospaced at all anymore.
- Because of this problem, better don't switch on
- the autohinter for
- Sazanami
- IPA
- DejaVu Sans Light
- DejaVu Sans Condensed
- DejaVu Serif Condensed
- FreeSans
- FreeSerif
- FreeMono
- and other fonts with similar problems until this is solved
- in the autohinter.
- -->
- <match target="font">
- <test name="fontformat">
- <string>TrueType</string>
- </test>
- <test name="family">
- <string>iLiHei</string>
- <string>Microsoft YaHei</string>
- <string>Vera Sans YuanTi</string>
- <string>Vera Sans YuanTi Mono</string>
- <string>MS PGothic</string>
- <string>MS UI Gothic</string>
- <string>MS Mincho</string>
- <string>MS PMincho</string>
- <string>HGPSoeiKakupoptai</string>
- <string>HGSGothicE</string>
- <string>HGSGothicM</string>
- <string>HGKyokashotai</string>
- <string>HGSSoeiKakugothicUB</string>
- <string>HGPGothicB</string>
- <string>HGPGothicE</string>
- <string>HGPGothicM</string>
- <string>HGSKyokashotai</string>
- <string>HGMaruGothicMPRO</string>
- <string>HGPSoeiKakugothicUB</string>
- <string>HGMinchoL</string>
- <string>HGPMinchoL</string>
- <string>HGMinchoB</string>
- <string>HGPMinchoB</string>
- <string>HGSMinchoB</string>
- <string>HGMinchoE</string>
- <string>HGPMinchoE</string>
- <string>HGSMinchoE</string>
- <string>HGSoeiKakugothicUB</string>
- <string>HGGyoshotai</string>
- <string>HGPGyoshotai</string>
- <string>HGSGyoshotai</string>
- <string>HGSoeiKakupoptai</string>
- <string>HGSSoeiPresenceEB</string>
- <string>HGPSoeiPresenceEB</string>
- <string>HGGothicB</string>
- <string>HGGothicE</string>
- <string>HGGothicM</string>
- <string>HGSoeiPresenceEB</string>
- <string>HGPKyokashotai</string>
- <string>HGSSoeiKakupoptai</string>
- <string>HGSeikaishotaiPRO</string>
- <string>TLKyokashotai</string>
- <string>TLMincho</string>
- <string>TLPMincho</string>
- <string>TLPGothic</string>
- <string>TLPKyokashotai</string>
- <string>TLMarugothicM</string>
- <string>TLGyoshotai</string>
- <string>TLPGyoshotai</string>
- <string>TLSGyoshotai</string>
- <string>TLPMarugothicM</string>
- <string>TLSMarugothicM</string>
- <string>TLSKyokashotai</string>
- <string>TLGothic</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- The following rule sets up black and white rendering with
- the byte code interpreter for a small list of fonts which
- are known to have good byte code and give bitmap quality
- results at small sizes.
- The pixelsize limit is set to '0' though, which effectively
- disables this rule by default because most users don't like
- that bitmap look and feel.
- If you like a bitmap look and feel of your desktop,
- copy this rule into your ~/.fonts.conf file and replace the '0'
- with non-zero pixelsize limit. Using '18' as the pixelsize
- limit is a good choice if you have the fonts in this list installed
- and like a bitmap look and feel.
- -->
- <match target="font">
- <test name="family">
- <string>iLiHei</string>
- <string>Microsoft YaHei</string>
- <string>Vera Sans YuanTi</string>
- <string>Vera Sans YuanTi Mono</string>
- <string>Andale Mono</string>
- <string>Arial</string>
- <string>Comic Sans MS</string>
- <string>Georgia</string>
- <string>Impact</string>
- <string>Trebuchet MS</string>
- <string>Verdana</string>
- <string>Courier New</string>
- <string>Times New Roman</string>
- <string>Tahoma</string>
- <string>Webdings</string>
- <string>Albany AMT</string>
- <string>Thorndale AMT</string>
- <string>Cumberland AMT</string>
- <string>Andale Sans</string>
- <string>Andy MT</string>
- <string>Bell MT</string>
- <string>Monotype Sorts</string>
- </test>
- <test name="pixelsize" compare="less_eq">
- <double>0</double>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- <edit name="antialias">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- Some CJK fonts require the byte code interpreter to be rendered correctly.
- These are composite fonts which store components and composing information
- and compose the glyphs on the fly using the hinting instructions.
- For all such fonts we switch off the autohinter here.
- When "autohint" is set to "false", the byte code interpreter will
- be used if it has been enabled at all when compiling freetype2.
- The Chinese fonts "MingLiu" and "PMingLiU" used to belong to the fonts
- which absolutely require the byte code interpreter to be rendered
- correctly.
- But apparently the new versions of "MingLiU" and "PMingLiU" from Windows
- Vista are rendered correctly without the byte code interpreter.
- -->
- <match target="font">
- <test name="family">
- <string>iLiHei</string>
- <string>Microsoft YaHei</string>
- <string>MingLiU</string>
- <string>Vera Sans YuanTi</string>
- <string>Vera Sans YuanTi Mono</string>
- <string>PMingLiU</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- <!--
- Hinting for CJK fonts in freetype doesn't yet work as well as for Latin fonts.
- Recently the autohinter in in freetype has been improved for CJK fonts
- a lot but it is still not perfect. Therefore one might want to switch
- off the autohinter for CJK fonts.
- This can be achieved by using the following rule:
- <match target="font">
- <test name="lang" compare="contains">
- <string>ja</string>
- <string>zh</string>
- <string>ko</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- -->
- <!--
- for some Bengali fonts (e.g. "Mukti Narrow"), the autohinter works well
- with the patch from http://www.kde.gr.jp/~akito/patch/freetype2/2.1.7
- applied. But for "Likhan" it still doesn't work that well
- (look how the "matra" lines at the top line up). Therefore, switch
- off the autohinter for the "Likhan" font:
- -->
- <match target="font">
- <test name="family">
- <string>iLiHei</string>
- <string>Likhan</string>
- <string>Microsoft YaHei</string>
- <string>Vera Sans YuanTi</string>
- <string>Vera Sans YuanTi Mono</string>
- </test>
- <edit name="autohint">
- <bool>true</bool>
- </edit>
- </match>
- </fontconfig>
复制代码
五、桌面环境的设置
KDE在systemsettings里:slight、medium、full。 不建议开RGB
GNOME在appearance里:Monochrome、Best shapes、Best contrast 、grayscale+slight等等。我开Subpixel smoothing会出现红蓝偏色。
注意不一定开得越高好,不同字体不同设置有最佳效果。
字体推荐:
文泉驿正黑(含等宽)
文泉驿微米黑(含等宽)
Vera Sans YuanTi (含等宽)
微软雅黑
微软正黑
iLiHei
重启。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|