LinuxSir.cn,穿越时空的Linuxsir!

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

我是这样美化ubuntu的,比较简单,中英文都有粗体,其他版本可能也适用

[复制链接]
发表于 2005-5-12 10:59:38 | 显示全部楼层 |阅读模式
参考了一些前辈的方法,。
1.准备字体
  登陆163邮箱mail.163.com(用户名sinsumbold,密码123456)到收件箱下载。大小是10+MB。这是论坛一位大侠提供的,非常感谢他。有了这个就有了粗体了,呵呵
  把那个字体保存到/usr/share/fonts/truetype/下,改名为simsunbd.ttf
  然后把simsun.ttf(或simsun.ttc)和tahoma.ttf,tahomabd.ttf也保存到/usr/share/fonts/truetype/,后缀都改为ttf
2. 修改/etc/fonts/fonts.conf,为了叙述方便我就全贴出来了
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/fonts.conf file to configure system font access -->
  4. <fontconfig>

  5. <!--
  6.         DO NOT EDIT THIS FILE.
  7.         IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
  8.         LOCAL CHANGES BELONG IN 'local.conf'.

  9.         The intent of this standard configuration file is to be adequate for
  10.         most environments.  If you have a reasonably normal environment and
  11.         have found problems with this configuration, they are probably
  12.         things that others will also want fixed.  Please submit any
  13.         problems to the fontconfig bugzilla system located at fontconfig.org

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

  17.         Keith Packard
  18. -->

  19.         <dir>/usr/share/fonts</dir>
  20.         <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/usr/local/share/fonts</dir>
  21.         <dir>~/.fonts</dir>

  22. <!--
  23.   Accept deprecated 'mono' alias, replacing it with 'monospace'
  24. -->
  25.         <match target="pattern">
  26.                 <test qual="any" name="family">
  27.                         <string>mono</string>
  28.                 </test>
  29.                 <edit name="family" mode="assign">
  30.                         <string>monospace</string>
  31.                 </edit>
  32.         </match>

  33. <!--
  34.   Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
  35. -->
  36.         <match target="pattern">
  37.                 <test qual="any" name="family">
  38.                         <string>sans serif</string>
  39.                 </test>
  40.                 <edit name="family" mode="assign">
  41.                         <string>sans-serif</string>
  42.                 </edit>
  43.         </match>

  44. <!--
  45.   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
  46. -->
  47.         <match target="pattern">
  48.                 <test qual="any" name="family">
  49.                         <string>sans</string>
  50.                 </test>
  51.                 <edit name="family" mode="assign">
  52.                         <string>sans-serif</string>
  53.                 </edit>
  54.         </match>

  55. <!--
  56.   Mark common families with their generics so we'll get
  57.   something reasonable
  58. -->

  59. <!--
  60.   Serif faces
  61. -->
  62.         <alias>
  63.                 [color=Red]<family>Tahoma</family>
  64.                 <family>SimSun</family>[/color]
  65.                 <family>Bitstream Vera Serif</family>
  66.                 <family>Times</family>
  67.                 <family>Times New Roman</family>
  68.                 <family>Nimbus Roman No9 L</family>
  69.                 <family>Luxi Serif</family>
  70.                 <family>Kochi Mincho</family>
  71.                 <family>AR PL SungtiL GB</family>
  72.                 <family>AR PL Mingti2L Big5</family>
  73.                 <family>Baekmuk Batang</family>
  74.                 <family>FreeSerif</family>
  75.                 <default><family>serif</family></default>
  76.         </alias>
  77. <!--
  78.   Sans-serif faces
  79. -->
  80.         <alias>
  81.                 [color=Red]<family>Tahoma</family>
  82.                 <family>SimSun</family>[/color]
  83.                 <family>Bitstream Vera Sans</family>
  84.                 <family>Helvetica</family>
  85.                 <family>Arial</family>
  86.                 <family>Verdana</family>
  87.                 <family>Nimbus Sans L</family>
  88.                 <family>Luxi Sans</family>
  89.                 <family>Kochi Gothic</family>
  90.                 <family>AR PL KaitiM GB</family>
  91.                 <family>AR PL KaitiM Big5</family>
  92.                 <family>Baekmuk Dotum</family>
  93.                 <family>SimSun</family>
  94.                 <family>FreeSans</family>
  95.                 <default><family>sans-serif</family></default>
  96.         </alias>
  97. <!--
  98.   Monospace faces
  99. -->
  100.         <alias>
  101.                 [color=Red]<family>Tahoma</family>
  102.                 <family>SimSun</family>[/color]
  103.                 <family>Bitstream Vera Sans Mono</family>
  104.                 <family>Courier</family>
  105.                 <family>Courier New</family>
  106.                 <family>Andale Mono</family>
  107.                 <family>Luxi Mono</family>
  108.                 <family>Nimbus Mono L</family>
  109.                 <family>NSimSun</family>
  110.                 <family>FreeMono</family>
  111.                 <default><family>monospace</family></default>
  112.         </alias>
  113. <!--
  114.   If the font still has no generic name, add sans-serif
  115. -->
  116.         <match target="pattern">
  117.                 <test qual="all" name="family" compare="not_eq">
  118.                         <string>sans-serif</string>
  119.                 </test>
  120.                 <test qual="all" name="family" compare="not_eq">
  121.                         <string>serif</string>
  122.                 </test>
  123.                 <test qual="all" name="family" compare="not_eq">
  124.                         <string>monospace</string>
  125.                 </test>
  126.                 <edit name="family" mode="append_last">
  127.                         <string>sans-serif</string>
  128.                 </edit>
  129.         </match>
  130.        
  131. <!--
  132.   Some Asian fonts misadvertise themselves as monospaced when
  133.   in fact they are dual-spaced (half and full).  This makes
  134.   FreeType very confused as it forces all widths to match.
  135.   Undo this magic by disabling the width forcing code -->
  136.         <match target="font">
  137.                 <test name="family"><string>GulimChe</string></test>
  138.                 <edit name="globaladvance"><bool>false</bool></edit>
  139.         </match>
  140.        
  141.         <match target="font">
  142.                 <test name="family"><string>DotumChe</string></test>
  143.                 <edit name="globaladvance"><bool>false</bool></edit>
  144.         </match>

  145.         <match target="font">
  146.                 <test name="family"><string>BatangChe</string></test>
  147.                 <edit name="globaladvance"><bool>false</bool></edit>
  148.         </match>

  149.         <match target="font">
  150.                 <test name="family"><string>GungsuhChe</string></test>
  151.                 <edit name="globaladvance"><bool>false</bool></edit>
  152.         </match>

  153. <!--
  154.         The Bitstream Vera fonts have GASP entries suggesting that hinting be
  155.         disabled below 8 ppem, but FreeType ignores those, preferring to use
  156.         the data found in the instructed hints.  The initial Vera release
  157.         didn't include the right instructions in the 'prep' table. Fix this
  158.         by disabling hinting manually at smaller sizes (< 8ppem)
  159. -->
  160.        
  161.         <match target="font">
  162.                 <test name="family">
  163.                         <string>Bitstream Vera Sans</string>
  164.                 </test>
  165.                 <test name="pixelsize" compare="less">
  166.                         <double>7.5</double>
  167.                 </test>
  168.                 <edit name="hinting">
  169.                         <bool>false</bool>
  170.                 </edit>
  171.         </match>
  172.        
  173.         <match target="font">
  174.                 <test name="family">
  175.                         <string>Bitstream Vera Serif</string>
  176.                 </test>
  177.                 <test name="pixelsize" compare="less">
  178.                         <double>7.5</double>
  179.                 </test>
  180.                 <edit name="hinting">
  181.                         <bool>false</bool>
  182.                 </edit>
  183.         </match>
  184.        
  185.         <match target="font">
  186.                 <test name="family">
  187.                         <string>Bitstream Vera Sans Mono</string>
  188.                 </test>
  189.                 <test name="pixelsize" compare="less">
  190.                         <double>7.5</double>
  191.                 </test>
  192.                 <edit name="hinting">
  193.                         <bool>false</bool>
  194.                 </edit>
  195.         </match>
  196.        
  197. <!--
  198.   Load local system customization file
  199. -->
  200.         <include ignore_missing="yes">local.conf</include>

  201. <!--
  202.   Load per-user customization file
  203. -->
  204.         <include ignore_missing="yes">~/.fonts.conf</include>

  205. <!--
  206.   Alias well known font names to available TrueType fonts
  207. -->
  208.         <alias>
  209.                 <family>Times</family>
  210.                 <accept><family>Times New Roman</family></accept>
  211.         </alias>
  212.         <alias>
  213.                 <family>Helvetica</family>
  214.                 <accept><family>Verdana</family></accept>
  215.         </alias>
  216.         <alias>
  217.                 <family>Arial</family>
  218.                 <accept><family>Verdana</family></accept>
  219.         </alias>
  220.         <alias>
  221.                 <family>Courier</family>
  222.                 <accept><family>Courier New</family></accept>
  223.         </alias>

  224. <!--
  225. Check user preference to avoid bitmap fonts and replace
  226. bitmap face names with equivalent scalable fonts
  227. -->

  228.         <match target="pattern">
  229.                 <test name="prefer_outline">
  230.                         <bool>true</bool>
  231.                 </test>
  232.                 <test name="family">
  233.                         <string>Helvetica</string>
  234.                 </test>
  235.                 <edit name="family" mode="prepend" binding="same">
  236.                         <string>Arial</string>
  237.                 </edit>
  238.         </match>

  239.         <match target="pattern">
  240.                 <test name="prefer_outline">
  241.                         <bool>true</bool>
  242.                 </test>
  243.                 <test name="family">
  244.                         <string>Times</string>
  245.                 </test>
  246.                 <edit name="family" mode="prepend" binding="same">
  247.                         <string>Times New Roman</string>
  248.                 </edit>
  249.         </match>
  250. <!--
  251.   Provide required aliases for standard names
  252. -->
  253.         <alias>
  254.                 <family>serif</family>
  255.                 <prefer>
  256.                         [color=Red]<family>Tahoma</family>
  257.                         <family>SimSun</family>[/color]
  258.                         <family>Bitstream Vera Serif</family>
  259.                         <family>Times New Roman</family>
  260.                         <family>Nimbus Roman No9 L</family>
  261.                         <family>Luxi Serif</family>
  262.                         <family>Times</family>
  263.                         <family>Frank Ruehl</family>
  264.                         <family>Kochi Mincho</family>
  265.                         <family>AR PL SungtiL GB</family>
  266.                         <family>AR PL Mingti2L Big5</family>
  267.                         <family>Baekmuk Batang</family>
  268.                         <family>FreeSerif</family>
  269.                 </prefer>
  270.         </alias>
  271.         <alias>
  272.                 <family>sans-serif</family>
  273.                 <prefer>
  274.                         [color=Red]<family>Tahoma</family>
  275.                         <family>SimSun</family>[/color]
  276.                         <family>Bitstream Vera Sans</family>
  277.                         <family>Verdana</family>
  278.                         <family>Nimbus Sans L</family>
  279.                         <family>Luxi Sans</family>
  280.                         <family>Arial</family>
  281.                         <family>Helvetica</family>
  282.                         <family>Nachlieli</family>
  283.                         <family>Kochi Gothic</family>
  284.                         <family>AR PL KaitiM GB</family>
  285.                         <family>AR PL KaitiM Big5</family>
  286.                         <family>Baekmuk Dotum</family>
  287.                         <family>SimSun</family>
  288.                         <family>FreeSans</family>
  289.                 </prefer>
  290.         </alias>
  291.         <alias>
  292.                 <family>monospace</family>
  293.                 <prefer>
  294.                         [color=Red]<family>Tahoma</family>
  295.                         <family>SimSun</family>[/color]
  296.                         <family>Bitstream Vera Sans Mono</family>
  297.                         <family>Andale Mono</family>
  298.                         <family>Courier New</family>
  299.                         <family>Luxi Mono</family>
  300.                         <family>Nimbus Mono L</family>
  301.                         <family>Miriam Mono</family>
  302.                         <family>Kochi Gothic</family>
  303.                         <family>AR PL KaitiM GB</family>
  304.                         <family>Baekmuk Dotum</family>
  305.                         <family>FreeMono</family>
  306.                 </prefer>
  307.         </alias>

  308. <!--
  309. Artificial oblique for fonts without an italic or oblique version
  310. -->

  311.         <match target="font">
  312.                 <!-- check to see if the font is roman -->
  313.                 <test name="slant">
  314.                         <const>roman</const>
  315.                 </test>
  316.                 <!-- check to see if the pattern requested non-roman -->
  317.                 <test target="pattern" name="slant" compare="not_eq">
  318.                         <const>roman</const>
  319.                 </test>
  320.                 <!-- multiply the matrix to slant the font -->
  321.                 <edit name="matrix" mode="assign">
  322.                         <times>
  323.                                 <name>matrix</name>
  324.                                 <matrix><double>1</double><double>0.2</double>
  325.                                         <double>0</double><double>1</double>
  326.                                 </matrix>
  327.                         </times>
  328.                 </edit>
  329.                 <!-- pretend the font is oblique now -->
  330.                 <edit name="slant" mode="assign">
  331.                         <const>oblique</const>
  332.                 </edit>
  333.         </match>

  334.         <config>
  335. <!--
  336.   These are the default Unicode chars that are expected to be blank
  337.   in fonts.  All other blank chars are assumed to be broken and
  338.   won't appear in the resulting charsets
  339. -->
  340.                 <blank>
  341.                         <int>0x0020</int>        <!-- SPACE -->
  342.                         <int>0x00a0</int>        <!-- NO-BREAK SPACE -->
  343.                         <int>0x00ad</int>        <!-- SOFT HYPHEN -->
  344.                         <int>0x115f</int>        <!-- HANGUL CHOSEONG FILLER -->
  345.                         <int>0x1160</int>        <!-- HANGUL JUNGSEONG FILLER -->
  346.                         <int>0x1680</int>        <!-- OGHAM SPACE MARK -->
  347.                         <int>0x2000</int>        <!-- EN QUAD -->
  348.                         <int>0x2001</int>        <!-- EM QUAD -->
  349.                         <int>0x2002</int>        <!-- EN SPACE -->
  350.                         <int>0x2003</int>        <!-- EM SPACE -->
  351.                         <int>0x2004</int>        <!-- THREE-PER-EM SPACE -->
  352.                         <int>0x2005</int>        <!-- FOUR-PER-EM SPACE -->
  353.                         <int>0x2006</int>        <!-- SIX-PER-EM SPACE -->
  354.                         <int>0x2007</int>        <!-- FIGURE SPACE -->
  355.                         <int>0x2008</int>        <!-- PUNCTUATION SPACE -->
  356.                         <int>0x2009</int>        <!-- THIN SPACE -->
  357.                         <int>0x200a</int>        <!-- HAIR SPACE -->
  358.                         <int>0x200b</int>        <!-- ZERO WIDTH SPACE -->
  359.                         <int>0x200c</int>        <!-- ZERO WIDTH NON-JOINER -->
  360.                         <int>0x200d</int>        <!-- ZERO WIDTH JOINER -->
  361.                         <int>0x200e</int>        <!-- LEFT-TO-RIGHT MARK -->
  362.                         <int>0x200f</int>        <!-- RIGHT-TO-LEFT MARK -->
  363.                         <int>0x2028</int>        <!-- LINE SEPARATOR -->
  364.                         <int>0x2029</int>        <!-- PARAGRAPH SEPARATOR -->
  365.                         <int>0x202a</int>        <!-- LEFT-TO-RIGHT EMBEDDING -->
  366.                         <int>0x202b</int>        <!-- RIGHT-TO-LEFT EMBEDDING -->
  367.                         <int>0x202c</int>        <!-- POP DIRECTIONAL FORMATTING -->
  368.                         <int>0x202d</int>        <!-- LEFT-TO-RIGHT OVERRIDE -->
  369.                         <int>0x202e</int>        <!-- RIGHT-TO-LEFT OVERRIDE -->
  370.                         <int>0x202f</int>        <!-- NARROW NO-BREAK SPACE -->
  371.                         <int>0x205f</int>        <!-- MEDIUM MATHEMATICAL SPACE -->
  372.                         <int>0x2060</int>        <!-- WORD JOINER -->
  373.                         <int>0x2061</int>        <!-- FUNCTION APPLICATION -->
  374.                         <int>0x2062</int>        <!-- INVISIBLE TIMES -->
  375.                         <int>0x2063</int>        <!-- INVISIBLE SEPARATOR -->
  376.                         <int>0x206A</int>        <!-- INHIBIT SYMMETRIC SWAPPING -->
  377.                         <int>0x206B</int>        <!-- ACTIVATE SYMMETRIC SWAPPING -->
  378.                         <int>0x206C</int>        <!-- INHIBIT ARABIC FORM SHAPING -->
  379.                         <int>0x206D</int>        <!-- ACTIVATE ARABIC FORM SHAPING -->
  380.                         <int>0x206E</int>        <!-- NATIONAL DIGIT SHAPES -->
  381.                         <int>0x206F</int>        <!-- NOMINAL DIGIT SHAPES -->
  382.                         <int>0x3000</int>        <!-- IDEOGRAPHIC SPACE -->
  383.                         <int>0x3164</int>        <!-- HANGUL FILLER -->
  384.                         <int>0xfeff</int>        <!-- ZERO WIDTH NO-BREAK SPACE -->
  385.                         <int>0xffa0</int>        <!-- HALFWIDTH HANGUL FILLER -->
  386.                         <int>0xfff9</int>        <!-- INTERLINEAR ANNOTATION ANCHOR -->
  387.                         <int>0xfffa</int>        <!-- INTERLINEAR ANNOTATION SEPARATOR -->
  388.                         <int>0xfffb</int>        <!-- INTERLINEAR ANNOTATION TERMINATOR -->
  389.                 </blank>
  390. <!--
  391.   Rescan configuration every 30 seconds when FcFontSetList is called
  392. -->
  393.                 <rescan>
  394.                         <int>30</int>
  395.                 </rescan>
  396.         </config>

  397. </fontconfig>

复制代码

3.sudo fc-cache -v -f
4.重新启动X,可以Ctrl+Alt+Backspace
5.进入gnome后,在"系统"->"首选项"->"字体"中,选择字体渲染为单色,所有字体大小为9号字
效果图如下:

本帖子中包含更多资源

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

x
发表于 2005-5-12 11:58:13 | 显示全部楼层
好,晚上回去试试。。
我的opera没有粗体,正郁闷着
回复 支持 反对

使用道具 举报

发表于 2005-5-12 13:39:20 | 显示全部楼层
用这种方法后,linuxsir的效果不好啊,别的到都不错。

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

发表于 2005-5-12 16:48:37 | 显示全部楼层
楼主的 fonts.conf 好像没什么不同之处
回复 支持 反对

使用道具 举报

发表于 2005-5-12 17:35:06 | 显示全部楼层
Post by wzflinux
用这种方法后,linuxsir的效果不好啊,别的到都不错。



看样子是英文粗体不了。
回复 支持 反对

使用道具 举报

发表于 2005-5-12 18:13:57 | 显示全部楼层
这只是加入一个simsun的粗体字,轮到其他字体,如果没有粗体字,自然没有了。属于最烂的方法之一,效果差不说,还编辑和重新发布了中易的版权字体,自己思量思量吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-12 19:21:59 | 显示全部楼层
忘了tahomabd.ttf了,这回肯定有了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-12 19:22:48 | 显示全部楼层
版权我没考虑,反正看着是挺舒服的,和Xp没什么区别了
回复 支持 反对

使用道具 举报

发表于 2005-5-12 20:16:37 | 显示全部楼层
Post by topmint
忘了tahomabd.ttf了,这回肯定有了



tahomabd.ttf???你是说把tahomabd.ttf复制到/usr/share/fonts/truetype/???????
关键问题:tahomabd.ttf哪里有???
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-12 22:16:30 | 显示全部楼层
Post by andey
tahomabd.ttf???你是说把tahomabd.ttf复制到/usr/share/fonts/truetype/???????
关键问题:tahomabd.ttf哪里有???


是啊,就在WINDOWS/Fonts/下阿
别和我说什么版权的事
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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