1 Á½Ì××ÖÌå
XFree86ϵͳÓÐÁ½Ì×µÄ×ÖÌåϵͳ£¬ÕâÒ²ÊÇΪʲôX-windowÖÐ×ÖÌåÉèÖýϸ´ÔÓµÄÔÒòÖ®Ò»¡£ÕâÁ½Ì×µÄ×ÖÌåϵͳ·Ö±ðÊÇ£ººËÐÄX11×ÖÌåϵͳºÍXft×ÖÌåϵͳ¡£ºËÐÄX11×ÖÌåϵͳÊÇÓ¦ÓÃ×î¹ã·ºµÄÒ»Ì××ÖÌåϵͳ£¬ËùÓеÄXϵͳ¶¼Ö§³Ö¡£Xft×ÖÌåϵͳÊÇÒ»¸öеÄ×ÖÌå¼¼Êõ£¬Ö»ÄÜÓÃÔÚ»ùÓÚXFree86ϵͳµÄXϵͳÉÏ£¬µ«¸ÃÌ××ÖÌåϵͳÅäÖüòµ¥£¬ÈÝÒ×ʹÓ㬽«ÊÇδÀ´·¢Õ¹µÄ·½Ïò¡£
1.1 Xft
XftÊÇÒ»¸ölibrary£¬ËüûÓÐ×ÔÒѵÄÅäÖûúÖÆ£¬ËüÒÀ¿¿ fontconfig¿âÀ´ÅäÖúͶ¨ÖÆ×ÖÌ壬Xft¸ºÔð×ÖÌåµÄÏÔʾ¡£Ò²¾ÍÊÇ˵£¬ fontconfigÊÇÒ»ÖÖÈÃXϵͳ¿ÉÒÔÕÒµ½Ä³ÖÖ×ÖÌåµÄ¿â£¬¶øXftÊǸºÔðÔÚXϵͳÖаÑfontconfig¿âÕÒµ½µÄ×ÖÌåÈçºÎÏÔʾ³öÀ´µÄ¿â¡£ËùÒÔÌÖÂÛ Xft×ÖÌåÅäÖÃÆäʵ¾ÍÊÇÌÖÂÛfontconfig¡£fontconfig°üº¬ÔÚXFree86·¢²¼°æÖС£
fontconfigµÄ×÷Óãº×Ô¶¯ËÑË÷×ÖÌå·¾¶£¬·¢ÏÖп½±´µÄ×ÖÌ壻µ±ÐèÏÔʾµÄ×ÖÌå²»´æÔÚʱ£¬»á×Ô¶¯Ñ¡ÔñÆäËü×ÖÌå´úÌæÏÔʾ¡£ÕâÒ²¾ÍÊÇÎÒÃÇÔÚÃÀ»¯×ÖÌåʱΪʲôҪµ÷Õû×ÖÌåµÄÅÅÁÐ˳ÐòµÄÔÒò£»ÅäºÏXftµÈXϵͳµÄäÖȾÒýÇ棬ʵÏÖÖÊÁ¿µÄ×ÖÌåÊä³ö¡£
fontconfig µÄÅäÖÃÎļþÓÐÈý¸ö£¬Ò»¸öÊÇϵͳ¼¶µÄÅäÖÃÎļþ£¬Î»ÓÚ/etc/fonts/fonts.conf£¬¸ÃĿ¼Ï»¹ÓÐÒ»¸ö local.conf£¬Ò»°ãÎÒÃÇÖ»ÐÞ¸Älocal.confÎļþ£¬fonts.confÒ»°ã²»½¨ÒéÈ¥Ð޸ģ¬²»¹ýfontconfig2.3ÒÔÉÏ°æ±¾ÒѾȡÏûµôÁËlocal.conf£¬ÏµÍ³¼¶µÄÅäÖÃÈ«²¿ÊÇfonts.confÎļþ£¬²¢ÇÒ2.3°æµÄfontconfigÒѾ½øÈëSarge¡£µÚÈý¸öÅäÖÃÎļþÊÇÓû§Ö÷Ŀ¼Ï嵀 ~/.fonts.conf£¬ËüÊÇÓû§¼¶µÄ×ÖÌåÅäÖÃÎļþ£¬Ö»¶Ôµ±Ç°Óû§ÓÐЧ¡£ÕâÈý¸öÎļþµÄ¸ñʽÊÇÒ»ÑùµÄ£¬¶¼ÊÇÒ»¸öXML¸ñʽµÄÎļþ¡£¸ÃXMLÎļþµÄÓï·¨¹æÔòÔÚfonts.dtdÀﶨÒå¡£ÏêϸµÄÅäÖýéÉÜÇë²Î¿¼ÖйúLinux¹«ÉçÖеġ°Linux¸ßÖÊÁ¿×ÖÌåÑо¿¡±ÂÛ̳¡£
ÔÚXft×ÖÌåϵͳÖа²×°ÐµÄ×ÖÌåÊǺܼòµ¥µÄ£¬Ö»Ðè°Ñ×ÖÌåÎļþ¿½±´µ½fonts.confÖÐÖ¸¶¨µÄ×ÖÌåÎļþĿ¼¼´¿É£¬fontconfig»á×Ô¶¯¸ÐÖªÐÂ×ÖÌ塣ĬÈϵÄ×ÖÌåĿ¼ÓÐËĸö£¬·Ö±ðÊÇ£º
[code]/usr/share/fonts
/usr/X11R6/lib/X11/fonts/Type1
/usr/local/share/fonts
~/.fonts[/code]
µ±È»Ò²ÄÜÔö¼ÓÆäËûĿ¼£¬Ö»ÒªÊÖ¶¯ÐÞ¸Ä/etc/X11/fs/configÎļþ£¬¸øÆäÖÐcatalogueÄÇÒ»ÐÐ×îºó¼ÓÉÏÄãµÄ×ÖÌå·¾¶¾Í¿ÉÒÔÁË¡£
°ÑÐÂ×ÖÌåÎļþ¿½±´µ½×ÖÌåĿ¼ºó£¬ÎÒÃǾͿÉÓÃfc-listÃüÁîÁгöа²×°µÄ×ÖÌ壬Èç¹ûûÓУ¬¿ÉÓÃfc-cacheÃüÁîÊÖ¶¯¸üÐÂϵͳ×ÖÌåÅäÖá£ÕâÑù£¬ÔÙÔËÐÐ fc-list¾ÍÓ¦¸Ã¿ÉÒÔ¿´µ½Ð°²×°µÄ×ÖÌåÁË¡£Ê¹ÓÃXft×ÖÌåϵͳÊDz»ÓÃÅäÖÃ/etc/X11/XF86config-4µÄ£¬Ò²²»ÓÃÖØÆôX·þÎñÆ÷ʹÅäÖÃÉúЧ¡£Xft×ÖÌåϵͳ±ÈÆð´«Í³µÄX11ºËÐÄ×ÖÌåϵͳÀ´ËµÕæµÄÊÇ·½±ãºÜ¶à¡£ËùÒÔËüÊÇδÀ´µÄ·¢Õ¹·½Ïò¡£Ä¿Ç°£¬²¢²»ÊÇËùÓеÄÓ¦ÓóÌÐò¶¼Ö§³ÖXft×ÖÌåϵͳ¡£ÏÂÃæÊǸ÷Àà³ÌÐò¶ÔXft×ÖÌåϵͳµÄÖ§³ÖÇé¿ö½éÉÜ£º
GTK+2.xºÍQT³ÌÐò¶¼¿ÉÒÔʹÓÃXft×ÖÌåϵͳ£¬µ«GTK+1.x³ÌÐòÊDz»Ö§³ÖXft×ÖÌåϵͳµÄ£¬ËüÖ»ÄÜʹÓÃX11ºËÐÄ×ÖÌåϵͳ¡£
GTK+2.2°æ±¾¼°ÒÔÉϵijÌÐòĬÈÏʹÓÃXft×ÖÌåϵͳ£¬²»ÓýøÐÐÅäÖá£GTK+2.0³ÌÐòÈç¹ûҪʹÓÃXft£¬ÔòÐèÉèÖû·¾³±äÁ¿GTK_USE_XFT=1¡£
GTK +2.x³ÌÐò×ÖÌåÅäÖÿÉͨ¹ýgnome×ÀÃæϵͳÌṩµÄgnome-font-properties¹¤¾ßÀ´ÅäÖ㬸ù¤¾ß¿ÉÔÚGNOME×ÀÃæ»·¾³ÖеÄ"Ó¦ÓóÌÐò"--"×ÀÃæÊ×Ñ¡Ïî"--"×ÖÌå"ÖÐÕÒµ½¡£GTK+2.x³ÌÐò»¹ÓÐÒ»¸öÈ«¾ÖÅäÖÃÎļþ/etc/gtk-2.0/gtkrc£¬ÀïÃæ¿ÉÉèÖà GTK+2.x³ÌÐòËùÓÃ×ÖÌ壬¸ÃÎļþµÄÄÚÈÝÈçÏ£º
[code]style "gtk-default-zh-cn" &
font_name = "Bitstream Vera Sans 10,SimSun 10"
&
class "GtkWidget" style "gtk-default-zh-cn"[/code]
ÕâÑùGTK+2.x³ÌÐòµÄÓ¢ÎÄ»áÓÃ10ºÅµÄBitstream Vera Sans×ÖÌåÏÔʾ£¬ÖÐÎÄ»áÓÃ10ºÅµÄSimSun×ÖÌåÏÔʾ¡£
QT³ÌÐòµÄĬÈÏ×ÖÌå¿ÉÔÚKDEµÄ¡°¿ØÖÆÖÐÐÄ¡±--¡°Íâ¹ÛºÍÖ÷Ì⡱--¡°×ÖÌ塱ÖÐÉèÖã¬Ò²¿ÉÔËÐÐqtconfigͼÐλ¯ÅäÖù¤¾ßÉèÖᣵ«ºÃÏó¿ØÖÆÖÐÐĵÄÉèÖÃÓÅÏȼ¶¸ßÓÚqtconfig¹¤¾ß¡£
1.2 X11ºËÐÄ×ÖÌåϵͳ
ÅäÖÃX11ºËÐÄ×ÖÌåÓÐÁ½²½£¬µÚÒ»²½Êǽ¨Á¢×ÖÌåĿ¼£¬ÔÚ¸ÃĿ¼Öаüº¬×ÖÌåÎļþ¡£µÚ¶þ²½ÊÇÅäÖÃX·þÎñÆ÷£¬Ê¹ËüÄÜʹÓÃÕâЩ×ÖÌå¡£ÏÂÃæÎÒÒÔÅäÖÃsimsun.ttc×ÖÌåΪÀý˵Ã÷£º
ÔÚ/usr/share/fonts/truetype/Ŀ¼Ï½¨Ò»Ä¿Â¼£ºmkdir /usr/share/fonts/truetype/ms
°Ñ΢ÈíµÄsimsunºÍtahoma×ÖÌ帴ÖƵ½¸ÃĿ¼Ï£¬²¢¸ÄÃû£º
[code]cp simsun.ttc /usr/share/fonts/truetype/ms/simsun.ttf
cp tahoma.ttf /usr/share/fonts/truetype/ms/tahoma.ttf[/code]
½øÈë×ÖÌåĿ¼cd /usr/share/fonts/truetype/ms/£¬Ö´ÐÐttmkfdir£¬Èç¹ûûÕâ¸öÃüÁÔòapt-get install ttmkfdir°²×°Ò»¸ö£¬È»ºóÖ´ÐУ¬Õâ¸öÃüÁÉú³Éfonts.scale£¬¸´ÖƸÃÎļþÒ»·ÝÃüÃûΪfonts.dir£ºcp fonts.scale fonts.dir¡£
½«simsunĿ¼¼ÓÈë/etc/X11/XF86Config-4ÀïÉ趨×ÖÌå·¾¶µÄÄÇÒ»²¿·Ö£¬¿ÉÒÔ¸øÄDz¿·ÖºóÃæ×·¼ÓÒ»ÐÐFontPath "/usr/share/fonts/truetype/ms"£¨¼Çס£¬Èç¹ûÏëÒªXftҲʹÓøÃ×ÖÌåµÄ»°£¬ÐÞ¸Ä/etc/X11/fs/configÎļþ£¬¸øÆäÖÐcatalogueÄÇÒ»ÐÐ×îºó¼ÓÉÏ/usr/share/fonts/truetype/ms/£©£¬ÖØÆôX·þÎñÆ÷ºó¾Í¿ÉʹÓÃsimsunºÍ tahoma×ÖÌåÁË¡£xlsfontsÃüÁî¿ÉÁгöϵͳÖÐÒÑ°²×°µÄX11ºËÐÄ×ÖÌå¡£
GTK+1.x³ÌÐòʹÓÃX11ºËÐÄ×ÖÌåϵͳ¡£ÒªÔÚ GTK+1.x³ÌÐòÖÐÕýÈ·ÏÔʾÖÐÎÄ£¬ÐèÐÞ¸Ä/etc/gtk/gtkrc.zh_CN£¬½«ÆäÖеÄÒýºÅÄÚµÄ×ÖÌåÃèÊöÐÅϢȫɾ³ýµô£¬¸ÄΪ¡°-adobe- helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,-misc-simsun-medium-r-normal -*-*-*-*-*-gbk-0,-*-¡±£¬ÕâÑùGTK+1.x³ÌÐò¾ÍÓ¦¸Ã¿ÉÒÔÕýÈ·µØÏÔʾÖÐÎÄÁË¡£
2 ×ÖÌåµÄÃÀ»¯
°²×°ºÃ×ÖÌåÒԺ󣬾ÍÊǶÔ×ÖÌåµÄÃÀ»¯ÉèÖÃÁË¡£ÏÖÔÚ¶àÊýµÄ³ÌÐò¶¼Ö§³ÖXft×ÖÌåϵͳµÄfontconfig¿â£¬ËùÒÔµ÷Õû¸Ã×ÖÌåϵͳ¾Í¿Éʹ³ÌÐò´ïµ½ºÜºÃµÄÏÔʾЧ¹û¡£¾ßÌåµ÷Õû·½·¨ÊÇ£ºÊ¹ÓõÄÊÇ2.2°æ±¾fontconfigÊÇÐÞ¸Ä/etc/fonts/local.conf£¬ÒòΪfonts.confÊÇϵͳ¼¶µÄ×ÖÌåÅäÖÃÎļþ£¬Ò»°ã²»ÒªÐ޸ĸÃÎļþ£¬Ëüͨ¹ýincludeÖ¸ÁîÓ¦ÓÃlocal.confÎļþÀïµÄÅäÖÃÐÅÏ¢£»£»2.3ÒÔÉÏ°æ±¾µÄfontconfigÔòÐÞ¸Ä /etc/fonts/fonts.confÎļþ£¬ÒѾȡÏûµôÁËlocal.confÎļþ¡£´ËÍ⻹Óиö~/.fonts.conf£¬ËüÊÇÓû§¼¶×ÖÌåÅäÖÃÎļþ£¬Ð޸ĴËÎļþÒ²ÄܴﵽЧ¹û¡£
ÎÒÓõÄfontconfig°æ±¾ÊÇ2.3.1-2£¬ËùÒÔ¾ÍÖ±½ÓÐÞ¸Ä/etc/fonts/fonts.confÎļþ£¬ÒÔÏÂÊÇÎÒµ÷Õû×ÖÌåµÄ¹ý³Ì£º
2.1 ÖØÅÅ×ÖÌåÏÔʾµÄÓÅÏȼ¶£¬Ê¹ÖÐÓ¢ÎÄ×ÖÌå¸üÃÀ¹Û£¬ÅÅÔÚ×îÇ°ÃæµÄ×ÖÌå»áÓÅÏÈÏÔʾ£¬Èç¹ûûÓиÃ×ÖÌ壬ÔòʹÓÃÏÂÒ»ÐеÄ×ÖÌ壬ÒÔ´ÎÀàÍÆ
ÕÒµ½
[code] [/code]
ºÍ
[code] [/code]
ÔÚ
[code]
¡¡
È»ºóÕÒµ½
[code] [/code]
ÔÚ
[code]
¡¡
Õâ¶ù¸ÄÍêÁË°É£¬ÏÂÃ滹ÓÐÒ»¸öµØ·½£¬
[code] [/code]
·¢ÏÖûÓУ¬ÕâÒ²ÊÇÈýÖÖ±ðÃû£ºserif¡¢sans-serif¡¢monospace£¬Õâ¶ùÔõô¸Ä²»ÓÃÎÒ˵ÁË°É£¿
2.2 µ÷ÕûÎÄ×Ö¼ä¾à¹ý´óÎÊÌ⣺
¼ÓÈëÒÔÏ´úÂ룺
[code]
2.3 ¹Ø±ÕËùÓÐ10ÖÁ15ºÅ×ÖÌåµÄ¿¹¾â³Ý¹¦ÄÜ£º
¼ÓÈëÒÔÏ´úÂ룺
[code]
ylc2014 ÓÚ 2014-08-14 13:38:38·¢±í:
¸ßÊÖ¡£
¶«·½EÆ·ÀÇ ÓÚ 2007-01-07 21:14:10·¢±í:
ÕæÊǸßÊÖѽ.:0L
lijunyan_888 ÓÚ 2007-01-06 23:55:27·¢±í:
ÏÖÔڲſ´µ½£¬Ò²ÆðÀ´¶¥Ò»Ï°ɡ«¡«¡«ºÇºÇ
ÏÄÓê ÓÚ 2006-09-12 09:05:34·¢±í:
лл½éÉÜ