LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4132|回复: 27

我的slackware 10.0 firefly补丁美化经历

[复制链接]
发表于 2004-6-27 17:04:36 | 显示全部楼层 |阅读模式
在用firefly的补丁前建议先看一下
http://www.linuxsir.cn/bbs/showthr...threadid=119645
guccio的美化方法。

如果有漂亮的字体,这种方法更简单而且更保险。

firefly的补丁在linuxsir就有下载:
http://gentoo.linuxsir.cn/main/download.html
下载日期最近的portage,如portgae0625.tar.bz2。
解开后,需要的补丁在

  1.         portage/media-libs/freetype/files
  2.         portage/media-libs/fontconfig/files
  3.         portage/x11-libs/xft/files或者portage/x11-libs/libXft
复制代码


我直接在firefly的主页上下载了for fc1的src.rpm。
http://firefly.idv.tw/setfont-xft/Fedora/Core_1/SRPMS/
只需要3个:fontconfig,freetype,xft(or libXft)

  1.         fontconfig-2.2.92-0.5.firefly.src.rpm
  2.         freetype-2.1.7-4.firefly.src.rpm
  3.         libXft-2.1.2-2.firefly.src.rpm
复制代码

分别用rpm2tgz解开,版本有些微小的差别,用的补丁都是一样的。
 楼主| 发表于 2004-6-27 17:18:30 | 显示全部楼层
安装按照freetype->fontconfig->xft的顺序
1.freetype

  1.         解开下载到的freetype-2.1.7.tar.bz2

  2.         #cd freetype-2.1.7
  3.         打上补丁:
  4.         #patch -p1 < ../freetype-2.1.6-enable_bytecode.patch
  5.         #patch -p1 < ../freetype-2.1.7-autohint-cjkfonts-20031121.patch
  6.          
  7.          #./configure --prefix=/usr                <----参数不要写错
  8.          #make
  9.          #make install         

复制代码


2.fontconfig


  1.         解开下载到的fontconfig-2.2.92.tar.gz (你用2.2.94或是2.2.95也一样)
  2.         要先安装打上补丁的fontconfig才能是xft编译通过。

  3.         #cd fontconfig-2.2.92

  4.         打上补丁:
  5.         #patch -p1 < ../fontconfig-2.2.92-add_ft2build_header.patch
  6.         #patch -p1 < ../fontconfig-2.2.1-fclang-miss_1_percent-20030617.patch
  7.         #patch -p1 < ../fontconfig-2.2.92-multifamily-20031217.patch
  8.         #patch -p1 < ../fontconfig-2.2.92-add_extra_option-20031207.patch
  9.         #patch -p1 < ../fontconfig-2.2.1-include_CJK_charmaps-20030626.patch
  10.         #patch -p1 < ../fontconfig-2.2.92-default_config-20031217.patch
  11.          
  12.          #./configure --sysconfdir=/etc --prefix=/usr/X11R6/ --mandir=/usr/share/man
  13.          #make
  14.          #make install         

复制代码


3.xft or libXft


  1.         #tar xvfj libXft-2.1.2.tar.bz2      <----这个是在firefly的主页上下载的src.rpm解开得到的,你用google也可以搜索下载xft-2.1.2.tar.gz
  2.         #cd libXft-2.1.2

  3.         #patch -p1 < ../libXft-2.1.2-add_ft2build_header.patch
  4.         #patch -p1 < ../libXft-2.1.2-CJK-extra-20031217.patch

  5.          #./configure --prefix=/usr/X11R6 --x-includes=/usr/X11R6/include --x-includes=/usr/X11R6/lib
  6.          #make
  7.          #make install        

复制代码


到这里就差不多了。
 楼主| 发表于 2004-6-27 17:27:24 | 显示全部楼层
如果你这时候急着重新启动X,会发现粗体还没有出来。
那是因为还有个旧的链接没处理。

  1.         #cd /usr/X11R6/lib
  2.         #ln -sf libXft.so.2.1.1 libXft.so.2           <----好像是这个,我忘了是哪个链接不对了。
  3.         
  4.         确保#ls libXft* -l的结果是这样:
  5.         -rw-r--r--  1 root root 1325438 2004-06-27 16:10 libXft.a
  6.         -rwxr-xr-x  1 root root     948 2004-06-27 16:10 libXft.la
  7.         lrwxrwxrwx  1 root root      15 2004-06-27 16:10 libXft.so -> libXft.so.2.1.1
  8.         lrwxrwxrwx  1 root root      13 2004-06-27 22:51 libXft.so.1 -> libXft.so.1.1
  9.         -rwxr-xr-x  1 root root   52780 2004-06-06 05:48 libXft.so.1.1
  10.         lrwxrwxrwx  1 root root      15 2004-06-27 16:27 libXft.so.2 -> libXft.so.2.1.1
  11.         -rwxr-xr-x  1 root root  725665 2004-06-27 16:10 libXft.so.2.1.1
  12.         -rwxr-xr-x  1 root root   72344 2004-06-06 05:48 libXft.so.2.1.2
复制代码


这下就有粗体了,改一下fonts.conf就可以了。
如果像我一样不怎么会改,我贴个MagicLinux 1.2的:

  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts.conf file to configure system font access -->
  4. <fontconfig>

  5. <!--
  6.         The intent of this standard configuration file is to be adequate for
  7.         most environments.  If you have a reasonably normal environment and
  8.         have found problems with this configuration, they are probably
  9.         things that others will also want fixed.  Please send any suggested
  10.         changes to [email]fonts@xfree86.org[/email] so that future releases can include
  11.         such changes.

  12.         Note that the normal 'make install' procedure for XFree86 is to
  13.         replace any existing fonts.conf file with the new version.  Place
  14.         any local customizations in local.conf which this file references.

  15.         Keith Packard
  16. -->


  17.         <dir>/usr/X11R6/lib/X11/fonts</dir>
  18.         <dir>/usr/share/fonts</dir>
  19.         <dir>~/.fonts</dir>

  20. <!--
  21.   Enable sub-pixel rendering
  22.         <match target="font">
  23.                 <test qual="all" name="rgba">
  24.                         <const>unknown</const>
  25.                 </test>
  26.                 <edit name="rgba" mode="assign"><const>rgb</const></edit>
  27.         </match>
  28. -->

  29. <!--
  30.   Accept deprecated 'mono' alias, replacing it with 'monospace'
  31. -->
  32.         <match target="pattern">
  33.                 <test qual="any" name="family">
  34.                         <string>mono</string>
  35.                 </test>
  36.                 <edit name="family" mode="assign">
  37.                         <string>monospace</string>
  38.                 </edit>
  39.         </match>

  40. <!--
  41.   Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
  42. -->
  43.         <match target="pattern">
  44.                 <test qual="any" name="family">
  45.                         <string>sans serif</string>
  46.                 </test>
  47.                 <edit name="family" mode="assign">
  48.                         <string>sans-serif</string>
  49.                 </edit>
  50.         </match>

  51. <!--
  52.   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
  53. -->
  54.         <match target="pattern">
  55.                 <test qual="any" name="family">
  56.                         <string>sans</string>
  57.                 </test>
  58.                 <edit name="family" mode="assign">
  59.                         <string>sans-serif</string>
  60.                 </edit>
  61.         </match>

  62. <!--
  63.   Mark common families with their generics so we'll get
  64.   something reasonable
  65. -->

  66. <!--
  67.   Serif faces
  68. -->
  69.         <alias>
  70.                 <family>Times</family>
  71.                 <family>Times New Roman</family>
  72.                 <family>Nimbus Roman No9 L</family>
  73.                 <family>Luxi Serif</family>
  74.                 <family>Simsun</family>
  75.                 <family>Kochi Mincho</family>
  76.                 <family>AR PL SungtiL GB</family>
  77.                 <family>AR PL Mingti2L Big5</family>
  78.                 <family>Baekmuk Batang</family>                       
  79.                 <default><family>serif</family></default>
  80.         </alias>
  81. <!--
  82.   Sans-serif faces
  83. -->
  84.         <alias>
  85.                 <family>Helvetica</family>
  86.                 <family>Arial</family>
  87.                 <family>Verdana</family>
  88.                 <family>Nimbus Sans L</family>
  89.                 <family>Luxi Sans</family>
  90.                 <family>SimSun</family>
  91.                 <family>Kochi Gothic</family>
  92.                 <family>AR PL KaitiM GB</family>
  93.                 <family>AR PL KaitiM Big5</family>
  94.                 <family>Baekmuk Dotum</family>
  95.                 <default><family>sans-serif</family></default>
  96.         </alias>
  97. <!--
  98.   Monospace faces
  99. -->
  100.         <alias>
  101.                 <family>Courier</family>
  102.                 <family>Courier New</family>
  103.                 <family>Andale Mono</family>
  104.                 <family>Luxi Mono</family>
  105.                 <family>Nimbus Mono L</family>
  106.                 <family>NSimSun</family>
  107.                 <default><family>monospace</family></default>
  108.         </alias>
  109. <!--
  110.   If the font still has no generic name, add sans-serif
  111. -->
  112.         <match target="pattern">
  113.                 <test qual="all" name="family" compare="not_eq">
  114.                         <string>sans-serif</string>
  115.                 </test>
  116.                 <test qual="all" name="family" compare="not_eq">
  117.                         <string>serif</string>
  118.                 </test>
  119.                 <test qual="all" name="family" compare="not_eq">
  120.                         <string>monospace</string>
  121.                 </test>
  122.                 <edit name="family" mode="append_last">
  123.                         <string>sans-serif</string>
  124.                 </edit>
  125.         </match>
  126.        
  127. <!--
  128.   Load per-user customization file
  129. -->
  130.         <include ignore_missing="yes">~/.fonts.conf</include>

  131. <!--
  132.   Load local system customization file
  133. -->
  134.         <include ignore_missing="yes">local.conf</include>

  135. <!--
  136.   Alias well known font names to available TrueType fonts
  137. -->
  138.         <alias>
  139.                 <family>Times</family>
  140.                 <accept><family>Times New Roman</family></accept>
  141.         </alias>
  142.         <alias>
  143.                 <family>Helvetica</family>
  144.                 <accept><family>Verdana</family></accept>
  145.         </alias>
  146.         <alias>
  147.                 <family>Arial</family>
  148.                 <accept><family>Verdana</family></accept>
  149.         </alias>
  150.         <alias>
  151.                 <family>Courier</family>
  152.                 <accept><family>Courier New</family></accept>
  153.         </alias>

  154. <!--
  155.   Provide required aliases for standard names
  156. -->
  157.         <alias>
  158.                 <family>serif</family>
  159.                 <prefer>
  160.                         <family>Times New Roman</family>
  161.                         <family>Nimbus Roman No9 L</family>
  162.                         <family>Luxi Serif</family>
  163.                         <family>Times</family>
  164.                         <family>Simsun</family>
  165.                         <family>Kochi Mincho</family>
  166.                         <family>AR PL SungtiL GB</family>
  167.                         <family>AR PL Mingti2L Big5</family>
  168.                         <family>Baekmuk Batang</family>
  169.                 </prefer>
  170.         </alias>
  171.         <alias>
  172.                 <family>sans-serif</family>
  173.                 <prefer>
  174.                         <family>Verdana</family>
  175.                         <family>Nimbus Sans L</family>
  176.                         <family>Luxi Sans</family>
  177.                         <family>Arial</family>
  178.                         <family>Helvetica</family>
  179.                         <family>SimSun</family>
  180.                         <family>Kochi Gothic</family>
  181.                         <family>AR PL KaitiM GB</family>
  182.                         <family>AR PL KaitiM Big5</family>
  183.                         <family>Baekmuk Dotum</family>

  184.                 </prefer>
  185.         </alias>
  186.         <alias>
  187.                 <family>monospace</family>
  188.                 <prefer>
  189.                         <family>Andale Mono</family>
  190.                         <family>Courier New</family>
  191.                         <family>Luxi Mono</family>
  192.                         <family>Nimbus Mono L</family>
  193.                         <family>Simsun</family>
  194.                         <family>Kochi Gothic</family>
  195.                         <family>AR PL KaitiM GB</family>
  196.                         <family>Baekmuk Dotum</family>
  197.                 </prefer>
  198.         </alias>

  199. <match target="font" >
  200.   <test compare="more" name="size" qual="any" >
  201.    <double>8</double>
  202.   </test>
  203.   <test compare="less" name="size" qual="any" >
  204.    <double>17</double>
  205.   </test>
  206.   <edit mode="assign" name="antialias" >
  207.    <bool>false</bool>
  208.   </edit>
  209. </match>

  210. <match target="font" >
  211.   <test compare="more" name="pixelsize" qual="any" >
  212.    <double>8</double>
  213.   </test>
  214.   <test compare="less" name="pixelsize" qual="any" >
  215.    <double>17</double>
  216.   </test>
  217.   <edit mode="assign" name="antialias" >
  218.    <bool>false</bool>
  219.   </edit>
  220. </match>

  221. <!--
  222. Artificial oblique for fonts without an italic or oblique version
  223. -->

  224.         <match target="font">
  225.                 <!-- check to see if the font is roman -->
  226.                 <test name="slant">
  227.                         <const>roman</const>
  228.                 </test>
  229.                 <!-- check to see if the pattern requested non-roman -->
  230.                 <test target="pattern" name="slant" compare="not_eq">
  231.                         <const>roman</const>
  232.                 </test>
  233.                 <!-- multiply the matrix to slant the font -->
  234.                 <edit name="matrix" mode="assign">
  235.                         <times>
  236.                                 <name>matrix</name>
  237.                                 <matrix><double>1</double><double>.2</double>
  238.                                         <double>0</double><double>1</double>
  239.                                 </matrix>
  240.                         </times>
  241.                 </edit>
  242.                 <edit name="antialias" mode="assign">
  243.                         <bool>true</bool>
  244.                 </edit>
  245.                 <!-- pretend the font is oblique now -->
  246.                 <edit name="slant" mode="assign">
  247.                         <const>oblique</const>
  248.                 </edit>
  249.         </match>
  250. <!--
  251. Add by [email]firefly@firefly.idv.tw[/email]
  252. Artificial bold for fonts without a bold version.
  253. -->
  254.         <match target="font">
  255.                 <!-- check to see if the pattern requested > "medium" -->
  256.                 <test target="pattern" name="weight" compare="more">
  257.                         <const>medium</const>
  258.                 </test>
  259.                 <!-- pretend the font is bold now -->
  260.                 <edit name="weight" mode="assign">
  261.                         <const>bold</const>
  262.                 </edit>
  263.         </match>


  264. <match target="font">
  265.         <test target="pattern" name="lang" compare="contains">
  266.                 <string>zh-tw</string>
  267.                 <string>zh-cn</string>
  268.                 <string>ja</string>
  269.                 <string>ko</string>
  270.         </test>
  271.         <test name="spacing" compare="eq">
  272.                 <const>mono</const>
  273.         </test>
  274.         <edit name="globaladvance" mode="assign">
  275.                 <bool>false</bool>
  276.         </edit>
  277. </match>


  278. <config>
  279. <!--
  280.   These are the default Unicode chars that are expected to be blank
  281.   in fonts.  All other blank chars are assumed to be broken and
  282.   won't appear in the resulting charsets
  283. -->
  284.                 <blank>
  285.                         <int>0x0020</int>        <!-- SPACE -->
  286.                         <int>0x00a0</int>        <!-- NO-BREAK SPACE -->
  287.                         <int>0x00ad</int>        <!-- SOFT HYPHEN -->
  288.                         <int>0x115f</int>        <!-- HANGUL CHOSEONG FILLER -->
  289.                         <int>0x1160</int>        <!-- HANGUL JUNGSEONG FILLER -->
  290.                         <int>0x1680</int>        <!-- OGHAM SPACE MARK -->
  291.                         <int>0x2000</int>        <!-- EN QUAD -->
  292.                         <int>0x2001</int>        <!-- EM QUAD -->
  293.                         <int>0x2002</int>        <!-- EN SPACE -->
  294.                         <int>0x2003</int>        <!-- EM SPACE -->
  295.                         <int>0x2004</int>        <!-- THREE-PER-EM SPACE -->
  296.                         <int>0x2005</int>        <!-- FOUR-PER-EM SPACE -->
  297.                         <int>0x2006</int>        <!-- SIX-PER-EM SPACE -->
  298.                         <int>0x2007</int>        <!-- FIGURE SPACE -->
  299.                         <int>0x2008</int>        <!-- PUNCTUATION SPACE -->
  300.                         <int>0x2009</int>        <!-- THIN SPACE -->
  301.                         <int>0x200a</int>        <!-- HAIR SPACE -->
  302.                         <int>0x200b</int>        <!-- ZERO WIDTH SPACE -->
  303.                         <int>0x200c</int>        <!-- ZERO WIDTH NON-JOINER -->
  304.                         <int>0x200d</int>        <!-- ZERO WIDTH JOINER -->
  305.                         <int>0x200e</int>        <!-- LEFT-TO-RIGHT MARK -->
  306.                         <int>0x200f</int>        <!-- RIGHT-TO-LEFT MARK -->
  307.                         <int>0x2028</int>        <!-- LINE SEPARATOR -->
  308.                         <int>0x2029</int>        <!-- PARAGRAPH SEPARATOR -->
  309.                         <int>0x202a</int>        <!-- LEFT-TO-RIGHT EMBEDDING -->
  310.                         <int>0x202b</int>        <!-- RIGHT-TO-LEFT EMBEDDING -->
  311.                         <int>0x202c</int>        <!-- POP DIRECTIONAL FORMATTING -->
  312.                         <int>0x202d</int>        <!-- LEFT-TO-RIGHT OVERRIDE -->
  313.                         <int>0x202e</int>        <!-- RIGHT-TO-LEFT OVERRIDE -->
  314.                         <int>0x202f</int>        <!-- NARROW NO-BREAK SPACE -->
  315.                         <int>0x205f</int>        <!-- MEDIUM MATHEMATICAL SPACE -->
  316.                         <int>0x2060</int>        <!-- WORD JOINER -->
  317.                         <int>0x2061</int>        <!-- FUNCTION APPLICATION -->
  318.                         <int>0x2062</int>        <!-- INVISIBLE TIMES -->
  319.                         <int>0x2063</int>        <!-- INVISIBLE SEPARATOR -->
  320.                         <int>0x206A</int>        <!-- INHIBIT SYMMETRIC SWAPPING -->
  321.                         <int>0x206B</int>        <!-- ACTIVATE SYMMETRIC SWAPPING -->
  322.                         <int>0x206C</int>        <!-- INHIBIT ARABIC FORM SHAPING -->
  323.                         <int>0x206D</int>        <!-- ACTIVATE ARABIC FORM SHAPING -->
  324.                         <int>0x206E</int>        <!-- NATIONAL DIGIT SHAPES -->
  325.                         <int>0x206F</int>        <!-- NOMINAL DIGIT SHAPES -->
  326.                         <int>0x3000</int>        <!-- IDEOGRAPHIC SPACE -->
  327.                         <int>0x3164</int>        <!-- HANGUL FILLER -->
  328.                         <int>0xfeff</int>        <!-- ZERO WIDTH NO-BREAK SPACE -->
  329.                         <int>0xffa0</int>        <!-- HALFWIDTH HANGUL FILLER -->
  330.                         <int>0xfff9</int>        <!-- INTERLINEAR ANNOTATION ANCHOR -->
  331.                         <int>0xfffa</int>        <!-- INTERLINEAR ANNOTATION SEPARATOR -->
  332.                         <int>0xfffa</int>        <!-- INTERLINEAR ANNOTATION TERMINATOR -->
  333.                 </blank>
  334. <!--
  335.   Rescan configuration every 30 seconds when FcFontSetList is called
  336. -->
  337.                 <rescan>
  338.                         <int>30</int>
  339.                 </rescan>
  340.         <other_family>
  341.                         <bool>true</bool>
  342.                 </other_family>
  343.         </config>

  344. </fontconfig>

复制代码


大功告成!:p
发表于 2004-6-27 17:27:33 | 显示全部楼层
效果图呢?
 楼主| 发表于 2004-6-27 17:30:05 | 显示全部楼层
再贴几个效果图:
字体选现里直接选simsun是没有粗体的,那是因为没有给pango打补丁。
无所谓,选个sans,tahoma什么的就可以了。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2004-6-27 17:41:32 | 显示全部楼层
再来张kde的。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2004-6-27 17:42:31 | 显示全部楼层
没打补丁,kde的字体选现里选simsun也没粗体。
就选个tahoma。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-6-27 17:46:01 | 显示全部楼层
讨厌firefly!授人鱼而不授人以渔!
发表于 2004-6-27 18:11:12 | 显示全部楼层
感谢楼主,顶!
 楼主| 发表于 2004-6-27 18:14:10 | 显示全部楼层
差点忘了,这个美化有点副作用。
就是ttmkfdir会编译报错,好像也要打补丁。
不过问题不大,sir上的fonts.dir多的事,随便搜一个拿来用就是了。
:p 补丁打来打去,我也有些厌烦了。
国家怎么就不能发布个免费的宋体呢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表