µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux - £Ø £×£É£Î£Ä£Ï£×£Ó ϵͳʹÓÃÖ¸ÄÏ(ʮһ)

£Ø £×£É£Î£Ä£Ï£×£Ó ϵͳʹÓÃÖ¸ÄÏ(ʮһ)

µÚ£±£³Õ ʹÓãصÄ×ÖÐͺÍÉ«²Ê

£ØÖ§Ô®¶àÖÖµÄ×ÖÐͼ°¼¸ºõÎÞÏÞ¶àÖֱ仯µÄÉ«²Ê£¬´ó¶àÊýµÄÓ¦ÓóÌʽÔÊÐíÄãÖ¸¶¨Ó¦ÓÃÊÓ´°Öи÷¸ö²»Í¬²¿·ÝµÄÑÕÉ«£¬¶ø¼¸ºõËùÓеģسÌʽ¾ùÔÊÐíÄãÖ¸¶¨ÄãÏëҪʹÓõÄ×ÖÐÍ¡£

ÔÚ£ØÖеÄ×ÖÐÍ(fonts)£º

£®Óй̶¨µÄ¿í¶È£¨ÏñÑÆÖն˻úµÄ×ÖÔª£©»ò³É±ÈÀýµÄ¼ä϶¡£

£®Óɱ¾ÎÄ×ÖÔª(text characters) »ò·ûºÅ×é³É£¬»òÒÔÉÏÁ½Õß¾ùÓС£

£®¾ßÓжàÖֵĵã³ß´ç(point size)¡£

£®¿ÉÒÔÐÞ¸ÄÒÔÊÊÓ¦Ìض¨µÄÓ©Ä»½âÎö¶È£¨ÀýÈç¶Ôì¶Í¬Ò»µã³ß´çµÄijһÖÖ×ÖÐÍ£¬Äã¿ÉÄܶÔ75 dpi (dots-per-inch ÿ´çÈô¸Éµã) µÄÓ©Ä»ÓÐÒ»ÖÖ°æ±¾£¬¶Ô100 dpi µÄÓ©Ä»ÓÐÁíÒ»ÖÖ°æ±¾£©¡£

£®ÓÐÒ»ÖÖ±ê×¼ÃüÃûµÄ´«Í³¡£

£®¿ÉÒÔÒÔÈ«Ãû´æÈ¡£¬Ò²¿ÉÒÔÓÃͨÓÃ×ÖÔª(wildcard)¡£

£®´¢´æÔÚÌض¨½¨¹¹µÄĿ¼Ê÷ÖУ¬Ö»ÒªserverÔÚÖ´ÐÐʱ£¬×ÖÐͱã¿ÉÒÔ¼ÓÈë»òÒƳö¡£

ÔÚϵͳ¼ä½øÐÐ×ÖÐ͵Ľ»»»ÓÐÒ»Ì×±ê×¼µÄ¸ñʽ£¬²¢ÇÒÓй¤¾ß³Ìʽ¿ÉÒÔ½«Õâ¸ö¸ñʽת»»³ÉÄãµÄserverÄÜÁ˽âµÄ¸ñʽ£¬¹¤¾ß³ÌʽҲ°üº¬ÁËÁгö¿ÉÓÃ×ÖÐ͵ÄĿ¼¡¢¹Û²ìijһÌض¨×ÖÐÍÄÚÈݵȹ¦ÄÜ¡£

±¾ÕÂÏȶÔ×ÖÐÍ×÷Ò»¼ò¶ÌµÄ½éÉÜ£¬ÈÃÄãÄܾ¡¿ìµÄʹÓÃËüÃÇ£¬È»áá²Åת¶øÏêϸµØ½âÊÍ×ÖÐ͵Ľṹ¡¢¸ñʽ¡¢¹¤¾ß³ÌʽµÈ£¬×îááÒ»½ÚÌÖÂÛÉ«²Ê£ºÈçºÎÉ趨ºÍʹÓÃËüÃÇ¡£


13.1 ×ÖÐͳõ²½

±¾½ÚµÄÄ¿µÄÊÇÈÃÄ㾡¿ìµØÄÜʹÓÃ×ÖÐÍ£¬ÎÒÃǽ«¸æËßÄãÈçºÎÕÒ³öÓÐÄÄЩ×ÖÐÍ¿ÉÓá¢Ö¸¶¨ÄãÓûʹÓõÄ×ÖÐÍÃû³Æ¡¢¿´×ÖÐ͵ÄÍâ¹Û¡¢ÈçºÎÔÚ£ØÓ¦ÓóÌʽÖÐʹÓÃ×ÖÐÍ¡£


13.1.1 Áгö¿ÉÓõÄ×ÖÐÍ

xlsfonts³ÌʽһÐÐÐеÄÁгöserverÉÏ¿ÉÓõÄ×ÖÐÍ£¬Í¼13-1ÏÔʾ²¿·ÝµÄ
xlsfontsµÄÊä³ö£¬ÄÚÈÝΪMIT °æ±ê×¼µÄ×ÖÐÍ¡£

©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p146 fig 13.1 ©¦
©¦ ©¦
©¦ ͼ13-1 µäÐ͵Ä×ÖÐÍĿ¼ÁÐ±í ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


13.1.2 ×ÖÐÍÃüÃû

ÓÐЩ×ÖÐ͵ÄÃû³ÆÌ«³¤ÒÔÖÂʹÓò»±ã£¬µ«ºÜÐÒÔ˵ģ¬ËüÃÇÒ²²»³£±»Ê¹Ó㬲¢ÇÒ£¬£ØÖ§Ô®×ÖÐÍÃû³Æ¿ÉʹÓÃͨ×ÖÔª(wildcard)£º

? ¶ÔÓ¦ÈκÎÒ»¸ö×ÖÔª
* ¶ÔÓ¦´Ó£¨×ÖÔª£©³¤¶ÈΪÁãÖÁ³¤¶ÈÈô¸ÉµÄ×Ö´®

ÕâºÍUnix shell´«Í³µÄͨÓÃ×ÖÔªµµ°¸Ãû³ÆÏàͬ£¬Ê¹ÓÃͨÓÃ×ÖÔª¿ÉʹÄã¸üÈÝÒ×Ö¸¶¨×ÖÐÍÃû³Æ¡£

×¢Ò⣺Èç¹ûÄãÔÚshell µÄÃüÁîÁÐÖ¸¶¨Ò»¸öͨÓÃ×ÖÔªµÄ×ÖÐÍÃû³Æ£¬ÐèÒªÔÚÃû³ÆÇ°áá¼ÓÉÏË«ÒýºÅ ¡£


13.1.3 ¹Û²ìÒ»¸öÌض¨µÄ×ÖÐÍ

xfd (£Ø font displayer µÄËõд) ³ÌʽÓÉÒýÊý(argument)µÃµ½×ÖÐ͵ÄÃû³ÆÖ®áᣬ½¨Á¢Ò»¸öÊÓ´°²¢ÇÒÔÚÊÓ´°ÖÐÏÔʾ´ËÃû³ÆÖ®×ÖÔª×ÖÐÍ£¬ÀýÈ磺

xfd -fn ""*symbol*-180-*""

½«ÏÔʾÈçͼ13-2µÄÊÓ´°¡£

©°¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©´
©¦ p147 fig 13.2 ©¦
©¦ ©¦
©¦ ͼ13-2 ×ÖÐ͵Äչʾ ©¦
©¸¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©¼


13.1.4 ÒԣسÌʽʹÓÃ×ÖÐÍ

´ó¶àÊýµÄ£Ø³ÌʽʹÓÃÎÄ×Ö£¬²¢ÇÒÔÊÐíÄãÖ¸¶¨Ê¹ÓõÄ×ÖÐÍ£¬ÈçºÎʹÓõÄÏêϸϸ½Ú¿ÉÄÜÒò²»Í¬µÄ³Ìʽ¶øÒ죬Èç¹ûÓÐÎÊÌâµÄ»°¿ÉÒÔ¿´Ö¸ÄÏÒ³¡£µ«ÊǼ¸ºõ¶¼ÊÇÒÔÃüÁîÁÐÖÐÑ¡Ïî -fn fontname »ò -font fontname À´Ö¸¶¨×ÖÐÍÃû³Æ£¬bitmap¡¢xclock¡¢xterm¡¢xload¡¢xmb ºÍ xedit¶¼ÊÇÕâÑù²Ù×÷µÄ¡£ÀýÈç¼ÙÉèÄãÊÇΪÁËչʾµÄÔµ¹Ê£¬ÒԺܴóµÄ×ÖÐÍÖ´ÐÐxterm £¬Äã¿ÉÒÔÓÃÏÂÁÐÃüÁîÁУº

xterm -fn ""*courier-bold-r-*-240-*""

×¢Ò⣺Èç¹ûÄã¸ø³ÌʽµÄÖ¸¶¨¶ÔÓ¦µ½Ò»ÖÖÒÔÉϵÄ×ÖÐÍ£¬Ôòserver»áËæ±ãÔÚÆäÖÐÑ¡È¡Ò»¸ö£¬ÀýÈ磺Èç¹ûÄãÊ¡ÂÔÁËÉÏÀýÖÐµÄ -r µÄÖ¸¶¨£¬ÔòÄã»áʹÓõ½Òâ´óÀûбÌå(italic)×ÖÐÍ»ò·´Ð±Ìå(reverse oblique) ×ÖÐÍ£¬ºÍÔ­À´ËùÖ¸¶¨µÄÂÞÂí(roman) ×ÖÐ͵Ļú»áÊÇÒ»ÑùµÄ¡£

ÏÖÔÚÄãÓ¦¸ÃÓÐһЩ¸ÅÄîÁË£¬ÎÒÃǽ«´Ó²»Í¬µÄ¹ÛµãÏêϸµØÌÖÂÛ¡£


13.2 ×ÖÐÍÈçºÎÃüÃû

ÔÚ£ØÖУ¬×ÖÐÍ¿ÉÒÔÈ¡³ÉÈκÎÃû³Æ£¬µ«¼¸ºõËùÓеÄ×ÖÐ;ùÒÀÕÕËüÃǵı¾ÖÊÀ´ÃüÃû£¬ÕâÑùµÄÃüÃû·½Ê½£¬Ãû×ÖÊÇÓɼ¸¸ö²»Ïà¹ØµÄ²¿·Ý×éºÏ¶ø³É£¬¶øÎÒÃÇÔÚʹÓÃÓ¦ÓóÌʽʱ£¬¹âƾÖø×ÖÐÍÃû³Æ±ã¿ÉÒÔ´óÂÔÁ˽â×ÖÐ͵ÄÄÚº­¡£

ÎÒÃÇÒÔÒ»¸ö×ÖÐÍÃû³ÆΪ·¶Àý£¬ÖðÒ»½âÊÍËüµÄ×é¼þ£¬×é¼þÖ®¼äÊÇÓɶ̺áÏß(-)Ëù·Ö¿ªµÄ£¬¶øÇÒ¿ÉÒÔ°üº¬¿Õ°×£¬×ÖÐÍÃû³Æ¶Ô×ÖÔª´óСд²¢²»»áÇø±ð£¬·¶ÀýÈçÏ£º

-adobe-times-bold-normal--12-120-75-75-p-67-iso8859-1

adobe £º×ÖÐ͵ÄÖÆÔ쳧ÉÌ¡£

times £ºÐÍ̬¼Ò×å(type family) £¬ÆäËüÉаüº¬courier £¬helvetica ºÍ new century schoolbook¡£

bold £º´ÖÌå×Ö£¬ÆäËü°üº¬light £¨Ï¸£©ºÍmedium£¨Öеȣ©¡£

r £º×ÖÌåÇãбµÄÐÍ̬£¬r ÊÇroman £¨ÂÞÂíÌ壩£¬ÆäËüÊÇ i£¨italicÒâ´óÀûÌ壩£¬o £¨oblique ÇãбÌ壩¡£

12 £º×ÖÔªµÄ¸ß¶È£¬µ¥Î»ÎªÏñËØ¡£

120 £º×ÖÐ͵ĵã³ß´ç(point-size)£¬ÎªµãµÄ10±¶£¨120 ÒâΪ12µã£¬Ò»µãԼΪ1/72Ó¢¡õ¿í£©¡£

75-75 £º×ÖÐͱ»Éè¼ÆÔÚÏÔʾװÖÃÉϵÄˮƽºÍ´¹Ö±µÄ½âÎö¶È£¨Ã¿¡õÈô¸Éµã£©¡£

p £º×ÖºÍ×ÖÖ®¼äµÄ¼ä϶£¬p ÊÇproportional£¨³É±ÈÀýµÄ£©£¬Ïà¶ÔµÄÊÇm £¨monospaced¹Ì¶¨¿í¶È£©¡£

Èç¹ûÄã¶ÔijһÀ¸ÓÐÌرðµÄÐËȤ£¬ÔÚ±¾°æµÄ˵Ã÷Îļþµµ

$TOP/doc/fontnames/fname.txt

ÖУ¬ÓжÔÿһ¸ö×é¼þÍêÕûµÄ˵Ã÷¡£

Äãͨ³£±È½ÏÓÐÐËȤµÄÏîĿΪ¼Ò×åÐÍ̬¡¢×ÖÌå´Öϸ¡¢ºÎÖÖбÌå×ÖÒÔ¼°×ÖÐÍ´óС£¬³ýÁËÖ¸¶¨Õ⼸ÏîµÄÖµÍ⣬ÆäËüµÄÏîÄ¿²»·Á½åÖøͨÓÃ×ÖÔªµÄ·½Ê½È¥Ö¸¶¨¡£


13.2.1 ͨÓÃ×ÖÔªºÍ×ÖÐÍÃû³Æ

ÔÚµÚ13.1½ÚÖУ¬ÎÒÃÇÔø¾­½âÊ͹ýͨÓÃ×ÖÔªµÄ¹æÔò£ºÐǺţ¨*£©±íʾ¶ÔÓ¦µ½Áã»ò¶à¸ö×ÖÔª£¬Îʺţ¨?£©¶ÔÓ¦µ½Ò»¸öÈÎÒâµÄµ¥Ò»×ÖÔª¡£

Äã¿ÉÒÔËæÒâµÄʹÓÃͨÓÃ×ÖÔª£¬µ±ÄãµÄÉ趨¶ÔÓ¦µ½Ò»ÖÖÒÔÉϵĿÉÓÃ×ÖÐÍʱ£¬server»áËæ±ãÌôÒ»ÖÖ×ÖÐÍÀ´Óã¬Èç¹ûÄãµÄÉ趨ʲ÷á×ÖÐÍҲû¶ÔÓ¦µ½£¬Í¨³£Äã»á»ñµÃÒ»ÐÐѶϢ£¬¶øserver½«»áʹÓÃÔ¤Éè×ÖÐÍ¡£

Äã¿ÉÒÔ¶Ô×ÖÐ͵ĵã³ß´çʹÓÃͨÓÃ×ÖÔª£¬¶ø²»ÊÇÏñËسߴ磬ÒòΪÔÚÏÔʾÆ÷ÉÏÒ»¸ö¸ø¶¨µã³ß´çµÄ×ÖÐͶԲ»Í¬µÄ½âÎö¶ÈÓв»Í¬µÄÏñËسߴ磬ËùÒÔÓÃͨÓÃ×ÖÔªÖ¸¶¨µã³ß´ç¿ÉÒÔÔì³ÉÓë×°±¸Î޹صÄЧ¹û£¬ÉÏÊöµÄ·¶ÀýÄã¿ÉÒÔÈç´ËÉ趨£º

*-times-bold-r-*-120-*

Ò²¾ÍÊÇ˵ÒÔ-120-È¡´ú-12-


13.2.2 Áгö¿ÉÓõÄ×ÖÐÍ -- xlsfonts

xlsfontsÁгöÔÚÄãserverÉÏ¿ÉÓõÄ×ÖÐÍ£¨Èç¹ûÄãʹÓÃÓÃÃüÁîÁÐÖÐ-displayÑ¡Ï±ã¿ÉÁгöÆäËüserverÉÏ¿ÉÓõÄ×ÖÐÍ£©¡£Ô¤ÉèÊÇÁгöËùÓеÄ×ÖÐÍ£¬µ«ÊǾÍÈçͬUnixµÄlsÃüÁîÒ»Ñù£¬Èç¹ûÄã¼ÓÉÏÏÞÖÆ£¬±ãÖ»»áÁгöºÏºõÏÞÖƵÄÏîÄ¿£¬ÀýÈ磺

xlsfonts ""*-times-*-180-*""

ÁгöËùÓÐ18µãTimesµÄ×ÖÐÍ¡£

Ô­ÔòÉÏ£¬xlsfontsÊÔͼÔÚÿÐÐÁÐÓ¡³ö¾¡Á¿¶àµÄ×ÖÐÍÃû³Æ£¬µ«Êµ¼ÊÉÏ£¬´ó²¿·ÝµÄ×ÖÐÍÃû³Æ¶¼ºÜ³¤ÒÔÖÂÒ»´ÎÖ»ÄÜÓ¡Ò»¸öÃû³Æ£¬µ«ÊÇҪСÐÄ£¬µ±×ÖÐÍÃû³Æº¬Óпհ×ʱ£¬Ò»ÐÐÓÐÊý¸ö×ÖÐÍÃû³Æ³£³£ÈÝÒ×»ìÏý¡£

×¢Ò⣺Ðí¶àµÄ×ÖÐÍÃû³Æ¿ªÍ·ÎªÒ»¶ÌºáÏß(-) £¬ËùÒÔxlsfonts»áÎó°Ñ´ËÖÖ×´¿öµ±³ÉÃüÁîÁеÄÑ¡ÏîÀ´½âÊÍÒÔÖ·¢Éú´íÎó£¬ÀýÈ磺

xlsfonts ""-adobe-*""

»áʧ°Ü£¬Äã¿ÉÒÔÓÃÑ¡Ïî-fn ¼ÓÒÔÇø·Ö£¬»òÕßÖ»ÒªÔÚÉ趨֮ǰ¼ÓÒ»¸öÐǺţ¨*£©¼´¿É£º

xlsfonts ""*-adobe-*""
xlsfonts -fn ""-adobe-*""



13.3 ¹Û²ìÌض¨×ÖÐ͵ÄÄÚÈÝ -- xfd

xfd ÊÇÒ»¸ö¡±×ÖÐÍÏÔʾ¡±µÄ³Ìʽ£¬Ëü½¨Á¢Ò»¸öÊÓ´°£¬¶øááÔÚÊÓ´°Öн«×ÖÐ͵ÄÔªËØÏÔʾÔÚ³¤·½¸ñ×ÓÖС£ÊÓ´°¿ÉÄÜûÓдóµ½Ò»´Î½«×ÖÐÍÖÐËùÓеÄ×ÖÔªÏÔʾ³öÀ´£¨ÓÈÆäÊÇÄã¿ÉÄܶÔËüÖض¨¹ý´óС£©£¬µ«ÄãÈÔÈ»¿ÉÒÔ´æÈ¡ËüÃÇ£º

ÏòÇ°Òƶ¯£ºÔÚxfd ÊÓ´°ÖÐÅö´¥»¬ÊóÓÒ°´Å¥£¬ÊÓ´°µÄÏÂÒ»Ò³½«»á³öÏÖ¡£

ÏòááÒƶ¯£ºÅö´¥»¬Êó×ó°´Å¥¡£

»ñÈ¡×ÖÔªµÄ×ÊѶ£ºÔÚ×ÖÔªÉÏÅö´¥»¬ÊóÖа´Å¥£¬xfd »á¸øÄã×ÖÔªºÅÂ룬Èç¹ûÄãÔÚ³Ìʽһ¿ªÊ¼É趨ÃüÁîÁÐÑ¡Ïî-verbose£¬Ä㽫»ñµÃһЩ¸ü¶àµÄ×ÊѶ£¬ÀýÈç×ÖÔªµÄ´óСÒÔ¼°ËüÔÚ×ÖÔª¡±cell¡±ÖеÄλÖá£



13.4 ÈçºÎ´¢´æ×ÖÐͼ°´æÔںδ¦

ÔÚ±¾½ÚÖУ¬ÎÒÃÇÃèÊö×ÖÐͲ»Í¬µÄ¸ñʽ£¬ÒÔ¼°×ª»»Á½ÖÖ²»Í¬¸ñʽµÄ¹¤¾ß£¬È»ááÌÖÂÛserverÊÇÈçºÎ´æÈ¡×ÖÐͺÍÄãÈçºÎ¸ü¸Ä¶Ô×ÖÐ͵ÄÑ¡Ôñ¡£×îáᣬÎÒÃÇ»á¸øÒ»¸öÍêÕûµÄ·¶ÀýÀ´ËµÃ÷ÈçºÎ¼ÓÈëÒ»ÖÖеÄ×ÖÐ͵½ÄãµÄϵͳ¡£


13.4.1 ×ÖÐ͵ĸñʽ -- Server Natural Format (SNF)

×ÖÐÍÔÚserverÉÏÊÇÒÔServer Natural Format (SNF) ·½Ê½´¢´æ£¬ÕâÖÖ¸ñʽ²¢²»ÊÇÒ»ÖÖ±ê×¼£¬¶øÇÒΪserverËùרÓã¬ËùÒÔÄã²»Äܽ«×ÖÐÍÒƵ½²»Í¬ÐÍ̬µÄserver¡£

showsnf ³Ìʽӡ³ö´¢´æÔÚSNF µµÖÐ×ÖÐ͵Ä×ÊѶ£¬¶Ô×ÖÐͱ¾ÉíÖ´ÐÐxprop ¿É»ñµÃ¸ü¶àÀàËƵÄ×ÊѶ¡£(showsnfµÄÒýÊýΪµµ°¸Ãû³Æ£¬xprop ÔòΪ×ÖÐ͵ÄÃû³Æ£¬×ÖÐÍÃû³ÆºÍµµ°¸Ãû³Æ²¢²»Ïà¹Ø¡£)

Bitmap Distribution Format£¨Î»ÔªÓ³Ïñ·Ö²¼¸ñʽ£©-- BDF

ΪÁË¿Ë·þ×ÖÐÍÁ÷´«µÄÎÊÌ⣬£ØЭ»á¶Ô×ÖÐͽ»»»Ö¸¶¨ÁËÒ»ÖÖ¸ñʽ£¬¾ÍÊÇBitmap Distribution Format (BDF) £¬BDF ÒÔASCII µÄ·½Ê½±íʾ×ÖÔªµÄλԪӳÏñ£¬²¢ÇÒÖ»°üº¬¿ÉÓ¡³öµÄ×ÖÔª£¬ËùÒÔËü¾ßÓÐÍêÕûµÄ¿ÉЯÐÔ(portable)¡£

ÔÚ¡±Bitmap Distribution Format¡±ÎļþÖаüº¬Á˶ÔBDF ÍêÕûµÄÃèÊö¡£

´ÓBDF ת»»³ÉSNF - bdftosnf

ΪÁËÈÃBDF Äܹ»ÓÐÓã¬Äã±ØÐèÄܽ«BDF ×ÖÐ͵µ×ª»»³ÉSNF µµ£¬Ä¿Ç°£ØЭ»á·ÅÆúÈÃÕâ¸öÐèÇó³ÉΪ£ØµÄ³ÉÆ·¡£

ÔÚMIT °æ£¬Äã¿ÉÒÔÓÃbdftosnfÀ´Íê³Éת»»¡£

ÓÉÆäËüµÄ¸ñʽת»»

Ðí¶àµÄ»æͼ»úÆ÷ÓµÓÐËüÃÇÖÆÔìÉÌ×Ô¼º·¢Õ¹µÄ×ÖÐÍ£¬Í¨³£ÌرðÊʺÏËüÃǵÄÏÔʾÆ÷¡£Èç¹ûÕâЩ×ÖÐÍÄÜÔÚ£ØʹÓÃÄÇÊÇÔÙºÃÒ²²»¹ýÁË£¬µ«ÊÇÒòΪ¸ñʽµÄÎÊÌ⣬Äã²»ÄÜʹÓÃËüÃÇ¡£

MIT core°æ²¢²»¹ÜÕâ¸öÎÊÌ⣬µ«ÊÇcore°æÔòÓÐÐí¶àµÄ¹¤¾ß³Ìʽ½«ÖÆÔìÉÌÌØÖƵÄ×ÖÐÍת»»³ÉBDF ¸ñʽ£¬´ÓBDF ÄãÓÖ¿ÉÒÔÓÃbdftosnfת»»³ÉÄã×Ô¼ºµÄSNF £¬±¾ÕÂÉÔááÎÒÃÇ»áÓÐÒ»¸öÕâÑùµÄ·¶Àý¡£


13.4.2 ×ÖÐÍ´¢´æÔںδ¦ -- ×ÖÐÍĿ¼

×ÖÐͱ»´¢´æÔÚserverÉÏijһ¸ö»ò¶à¸ö×ÖÐÍĿ¼(font directory)ÖУ¬×ÖÐÍĿ¼ÓÉÈý¸ö²¿·Ý×é³É£º

1. Ò»¸öÆÕͨµÄĿ¼£¬Îª°üº¬Öø×ÖÐ͵ÄSNF µµ°¸Ö®ËùÔÚ¡£

2. Ò»¸ö±»£ØʹÓ㬽«SNF µµ°¸Ãû³Æ¶ÔÓ¦µ½×ÖÐÍÃû³ÆµÄ×ÊÁÏ¿â¡£

3. Ò»¸ö¿ÉÑ¡ÔñÐԵıðÃûµµ(aliase file) £¬¿ÉÒÔÈÃÄãÓÃÒ»¸öÒÔÉϵÄÃû³Æ²Î¿¼µ½Í¬Ò»×ÖÐÍ£¨²»ÂÛÄãʹÓÃÁ˶àÉÙ¸öĿ¼£¬ÄãÖ»ÐèÒªÒ»¸ö±ðÃûµµ£©¡£

ά»¤×ÖÐÍĿ¼ -- mkfontdir

mkfontdir É趨еÄ×ÖÐÍĿ¼²¢ÇÒ¿ÉÒÔÐÞ¸ÄËü£º

1. ÔÚµµ°¸Ä¿Â¼ÖÐËѼ¯ÁËËùÓÐÄãҪʹÓÃ×ÖÐ͵ĵµ°¸£¬µµ°¸¿ÉÒÔÊÇBDF µµ£¨Í¨³£µµÃû½áβΪ.bdf£©£¬SNF µµ°¸(.snf)»ò±»Ñ¹ËõµÄSNF µµ(.snf.Z)£¬mkfontdir »á×Ô¶¯½«·ÇSNF µµ°¸×ª»»ÎªSNF µµ°¸¡££¨±»Ñ¹ËõµÄµµ°¸ÊDZ»BSD ѹËõ³ÌʽִÐйýÓÃÒÔ½ÚÊ¡µµ°¸¿Õ¼ä¡££©

2. Èç¹ûÄãҪʹÓñðÃû£¬ÐèÒªÔÚ×ÖÐÍĿ¼Öн¨Á¢£¨»ò±à¼­£©Ò»¸öÃûΪfonts.aliaseµÄµµ°¸¡£Óйش˵µ°¸¸ñʽµÄϸ½Ú²¿·ÝÔÚÖ¸ÄÏÒ³ÖÐÓÐ˵Ã÷£¬¼òµ¥µØ˵£¬ËüµÄ¸ñʽΪÿÐÐÒÔ¿Õ°×¼ä¸ô³öÁ½¸öÀ¸Î»£¬µÚÒ»À¸ÊDZðÃûµÄÃû³Æ£¬µÚ¶þÀ¸ÔòÊÇ×ÖÐ͵ÄÃû³Æ£¨¿É°üº¬Í¨ÓÃ×ÖÔª£©£¬ÀýÈ磺

tbi12 *-times-bold-i*-120*

×¢Ò⣺Äã¶Ô×ÖÐͶ¨ÒåµÄµÚÒ»¸ö±ðÃû½«Ôì³É¸Ã×ÖÐÍÕæÕýµÄÃû³ÆÎÞ·¨Ê¹Óã¬ÒÔÉÏÀý¶øÑÔ£¬ÄãÖ»ÄÜÒÔtbi12 À´´æÈ¡×ÖÐÍ£¬ÕâÖÖÇéÐÎÒ²ÐíÏÂÒ»°æ»á¸Ä½ø£¬µ«Ä¿Ç°Äã¿ÉÒÔÔÚµÚ¶þÐн«µÚÒ»Ðз´¹ýÀ´¼´¿É£¨µ«²»¿ÉʹÓÃͨÓÃ×ÖÔª£©¡£

tbi12 *-times-bold-i*-120*
-adobe-times-bold-i-normal--12-120-75-755-p-68-iso8859-1 tbi12

3. Ö´ÐÐmkfontdir £¬Ðè°Ñµµ°¸Ãû³Æµ±³ÉÒýÊýÊäÈ룬ÒÔÄãʹÓÃÔ¤ÉèµÄ£Ø½¨¹¹ÎªÀý £º

mkfontdir /usr/lib/x11/fonts/misc
/usr/lib/x11/fonts/75dpi
/usr/lib/x11/fonts/100dpi

£¨Èç¹ûµµ°¸Ä¿Â¼ÖÐûÓаüº¬×ÖÐÍ×ÊÁϿ⣬mkfontdir »áºöÂÔËü¡££©

×¢Ò⣺½¨Á¢Ò»¸ö×ÖÐÍĿ¼²¢²»»áµ¼ÖÂserver¡±×¢Ò⡱Ëü£¬Äã±ØÐèÖØÐÂÆô¶¯server»òÖØÉè×ÖÐÍËÑѰ·¾¶(search path) £¨ÏÂÃæÃèÊö£©£º

×ÖÐÍËÑѰ·¾¶ -- xset

Äã¿ÉÒÔʹÓÃÈκÎÊýÄ¿µÄ×ÖÐÍĿ¼£¬µ«Èç¹ûËüÃÇÓÐÈκκÍÔ¤É轨¹¹²»Í¬µÄµØ·½£¬ÄãÐèÃ÷È·µÄ¸æËßserver£¬ÕâЩ×ÖÐÍĿ¼µÄÁбí³Æ֮Ϊ×ÖÐÍËÑѰ·¾¶(font search path)»ò×ÖÐÍ·¾¶(font path) £¬Äã¿ÉÒÔÉ趨Õâ¸öÒ»Á¬´®ÒÔ¶ºµãΪÇø¸ôµÄµµ°¸Ä¿Â¼¡£

²é¿´ÄãÄ¿Ç°µÄ×ÖÐÍ·¾¶£ºÊ¹ÓÃÃüÁîxset q£¬Èç´Ë»áÓ¡³öÒ»´ó¶Ñ×ÊѶ£¬ÆäÖÐÓÐÒ»Ðаüº¬ÖøÄãµÄ×ÖÐÍ·¾¶ÀàËÆÏÂÃ棺

Font Path : /usr/lib/x11/fonts/misc/,(cond.)
/usr/lib/x11/fonts/75dpi/,/usr/lib/x11/fonts/100dpi/

É趨²»Í¬µÄ×ÖÐÍ·¾¶£ºÊ¹ÓÃÃüÁîxset fp new-path£¬ÀýÈ磬Èç¹ûÄãÓдóÁ¿µÄ±¾µØ×ÖÐÍÇÒ²»ÓûʹÓöàÊýµÄ±ê×¼×ÖÐÍ£º

xset fp /usr/local/xfonts, /usr/lib/x11/fonts/75dpi

×¢Ò⣺fp֮ǰ²¢ÎÞÒ»¶ÌºáÏß(-) £¬ÊÇfp¶ø·Ç -fp£¨-fp µÄÒâÒ岻ͬ£¬¼ûÏÂÊö£©¡£

µ±ÄãÏëÖØÐÂÉ趨server¶Ô×ÖÐÍ·¾¶µÄÔ¤Éèֵʱ£¬Ê¹ÓÃÃüÁ

xset fp default

¸æËßserverÖØжÁÈë×ÖÐ͵ÄĿ¼£¬Ê¹ÓÃÃüÁ

xset fp rehash

Ëü¸æËßserverÄã¿ÉÄÜÒѾ­¸Ä±äÁË×ÖÐÍĿ¼µÄÄÚÈݶøºÍËü±ØÐëÖضÁ×ÖÐÍ×ÊÁϿ⣬ÏÖÔÚмÓÈëµÄ×ÖÐÍ¿ÉÒÔ¿ªÊ¼´æÈ¡ÁË¡£

ÔÚÏÖ´æµÄ·¾¶¼ÓÈëеÄ×ÖÐÍĿ¼£¬Ê¹ÓÃÃüÁ

xset +fp dirlist

¼ÓÈëÒ»ÁÐÓɶººÅ·Ö¸ôµÄĿ¼ÁÐ(dirlist) ÔÚÏÖ´æ·¾¶Ö®×󣬶ø

xset fp+ dirlist

Ôò½«Ä¿Â¼Áмӵ½Â·¾¶Ö®ÓÒ¡£

½«×ÖÐÍĿ¼×Ô·¾¶ÒÆÈ¥£ºÏÂÁ½¸öÃüÁîÁÐ

xset -fp dirlist
xset fp- dirlist

¾ù¿É½«ÔÚdirlist ÖеÄĿ¼×ÔÏÖÓз¾¶ÒÆÈ¥¡£

×¢Ò⣺×ÖÐÍ·¾¶ÓÉserverËùÕÆÎÕ£¬¶ø±»ËùÓÐʹÓøÃserverµÄclientËùÓ¦Óá£

×ÖÐÍ·¾¶µÄ´ÎÐòÊÇÖØÒªµÄ£¬ÎÒÃÇÔø¾­Ìá¹ý×ÖÐÍÉ趨¿ÉÒÔ¶ÔÓ¦ÖÁÒ»»ò¶à¸ö×ÖÐÍ£¬server»á×ÔÐÐÑ¡Ôñ£¬µ«Èç¹û¶ÔÓ¦µÄ×ÖÐÍÊÇÔÚ²»Í¬µÄĿ¼ÖУ¬Ôòserver»áÑ¡ÔñÔÚ·¾¶ÖнÏÔç³öÏÖÕß¡£

Äã¿ÉÒÔÀûÓÃÕâ¸öÔ­ÔòÀ´°²ÅÅ×îÊʺÏÄãµÄÏÔʾÆ÷½âÎö¶ÈµÄ×ÖÐÍ¡£¼ÙÉèÄãµÄÏÔʾÆ÷½âÎö¶ÈΪ100dpi£¬Ôò½«100dpi×ÖÐÍÉèÔÚ75dpi ֮ǰ£¬ÀýÈ磺

xset fp /usr/lib/x11/fonts/100dpi/,
/usr/lib/x11/fonts/75dpi/

Èç¹ûÄãÖ¸¶¨×ÖÐÍΪ£º

* -times-bold-r-*-120-*

ËäÈ»×ÖÐÍÓÐ75dpi ºÍ100dpiÁ½ÖÖ°æ±¾£¬µ«Äã»áÓõ½100dpiµÄ×ÖÐÍ£¬ÕâÕýÊÇÄãËùÐèÒªµÄ¡£


13.5 ·¶Àý£ºÔö¼ÓÐÂ×ÖÐÍÖÁÄãµÄserver

ÏÖÔÚÎÒÃǽ«ËµÃ÷ÈçºÎÔö¼ÓÒ»¸öеÄ×ÖÐ͵½ÄãµÄserverµÄÍêÕû·¶Àý£¬ÎªÁËÕæʵÆð¼û£¬ÎÒÃÇÒÔSunËùÌṩµÄ×ÖÐÍΪÀý£¬½«Ëüת»»ÖÁBDF £¬È»áá×°Éè(install)Ëü£¬×ÖÐÍ¿ªÊ¼Ê±ÔÚ£º

/usr/lib/fonts/fixedwidthfonts/screen.r.7

Óû½«Sun µÄ×ÖÐÍת»»³ÉBDF £¬ÎÒÃÇÐèʹÓÃcontrib °æµÄÈíÌå³Ìʽvtobdf£¨ÆäËüϵͳҲÓÐÀàËƵŤ¾ß£©¡£vtobdfÓÐÁ½¸öÒýÊý£¬·Ö±ðÊÇÊäÈëµµµµÃûºÍÓû½¨Á¢Ö®BDF µµµµÃû£¬ÎÒÃÇ¿ÉÒÔÊÂÏÈ×Ôcontrib ´Å´øÈ¡µÃ´Ë³Ìʽ£¬±àÒëËü£¬¶øáá¼ÓÈëÎÒÃÇ¿ÉÖ´ÐеÄĿ¼ÖУ¬ÎÒÃǾͿÉÒÔʹÓÃËüÁË£¬ÎÒÃǽ«»ò¶à»òÉÙÒÀ¾Ý£ØµÄ±ê×¼À´ÃüÃûÕâ¸öеÄ×ÖÐÍ£¬ÎÒÃÇϲ»¶°ÑÊä³öµµµÄµµÎ²ÃûÓÃ.bdf£¬µ«ÓÉì¶vtobdf»áÔÚ×ÖÐÍÃû³Æáá×Ô¶¯²úÉú.bdf£¬ËùÒÔ¿ÉÒÔÊ¡ÂÔËü£¬µ«ÔÚÉÔááÖ®Öض¨Ãû³ÆÔò²»¿ÉÊ¡ÂÔ¡£

venus% cd/tmp
venus% vtobdf /usr/lib/fonts/fixedwidthfonts/screen.r.7
-sun-screen--r-normal---70-75-75-m---

ÏÖÔÚÖØÐÂÃüÃûµµ°¸£¬²¢½«Æä°áÈë×ÖÐÍĿ¼£º

venus% mv- -sun-screen--r-normal---70-75-75-m---
/usr/lib/x11/fonts/misc/-sun-screen--r-normal---70-75-75-m---.bdf

×îáᣬִÐÐmkfontdir ºÍ¸æËßserverÖØжÁÈë×ÖÐÍĿ¼ÒÔ±ãÄÜʹÓôË×ÖÐÍ£º

venus% mkfontdir
venus% xset fp rehash

¼ì²éһϴË×ÖÐÍÊÇ·ñÕæµÄ¿ÉÓãº

venus% xlsfonts ""*-sun_screen*""
-sun-screen--r-normal---70-75-75-m---

×¢Ò⣺ÄãµÄ×ÖÐÍ¿ÉÄÜ¿ÉÒÔÈ¡´úÆäËüµÄÔ¤Éè×ÖÐÍ£¬µ«ÕâЩ×ÖÐ͵µ°¸¿ÉÄÜÒòÓб£»¤¶øÎÞ·¨¸ü¸Ä£¬±ØÐëÎÊÒ»ÏÂÄãµÄϵͳ¹ÜÀíÕß¡£


13.6 ʹÓãصÄÉ«²Ê

ÎÒÃÇÒѾ­ÓùýһЩɫ²Ê£¬µ«²¢Î´Ï¸ÊöËüÃÇ£¬Ô­ÒòÊÇ£ØÔÊÐíÄãÓÃÈÕ³£³£ÓõIJÊÉ«Ãû£¬ÔÚ±¾½ÚÎÒÃÇÃèÊöһЩÆäËüÖ¸¶¨ÑÕÉ«µÄ·½·¨£¬½âÊÍÃüÁî½á¹¹ÈçºÎ¹¤×÷ºÍÄãÈçºÎÉ趨һЩÄã×Ô¼ºÓµÓеÄÉ«²ÊÃû³Æ¡£


13.6.1 RGB É«²ÊÉ趨

»»Ò»ÖÖÖ¸¶¨É«²ÊµÄ·½Ê½£¬Äã¿ÉÒÔÓÃRGB (Red (ºì)¡¢Green (ÂÌ)¡¢Blue (À¶))ÈýÔªËØÀ´Ö¸¶¨£¬É趨֮ÐÎʽΪ£º

#

±ØÐëºÏºõÒÔϵÄÔ­Ôò£º

£®É趨±ØÐèÒÔ¾®×ÖºÅ(#) ¿ªÍ·¡£

£®ÔªËØÐèÒÀÕպ졢ÂÌ¡¢À¶µÄ´ÎÐòÒÀÐòÉ趨¡£

£®ÈýÔªËؾù±ØÐëÖ¸¶¨¡£

£®Ã¿Ò»¸öÔªËØΪʮÁù½ø룬¹²Õ¼Ò»µ½ËĸöλÊý£¬Òò´Ëffff´ú±íÉ«²ÊµÄ×î´óÇ¿¶È£¬0000´ú±íûÓиÃÉ«²Ê£¬ÀýÈ磺

#0000ffff0000

ÊÇ×îÁÁµÄÂÌÉ«£¬ºìÉ«ºÍÀ¶É«Ò»µã¶¼Ã»ÓУ¬Í¬ÑùµÄ£º

#000000000000 ºÚÉ«£¨Ê²÷áÉ«²Ê¶¼Ã»ÓУ©
#ffff0000ffff ×ÏÉ«£¨È«²¿µÄºìÉ«¼ÓÀ¶É«£©
#ffffffffffff °×É«£¨È«²¿µÄÉ«²Ê£©

×¢Òâ#rgbºÍ#rrrgggbbb´ú±íµÄÉ«²ÊÇ¿¶ÈÊÇÏàͬµÄ£¬µ«ááÕß½ÏÁÁһЩ¡£

£®Ã¿Ò»¸öÔªËØ¿ÉÓÉÒ»µ½ËĸöλÊý´ú±í£¬µ«Ã¿¸öÔªËصÄλÊýÔòÏàͬ£¨ÀýÈçÄã²»¿ÉÒÔÓÃ#rrbbbbgg £©¡£

Äã¿ÉÒÔÔÚÉ趨ɫ²Êʱֱ½ÓʹÓÃÉ«²ÊÃû³Æ£¬ÀýÈ磺

xclock -fg #3d7585 -background pink

É«²ÊÉ趨µÄÐÎʽÍùÍùºÍÄãµÄÏÔʾÆ÷·Ç³£Ïà¹Ø£¬Í¨³£Ã»ÓÐʲ÷á¿ÉЯÐÔ¡£


13.6.2 £ØÉ«²Ê×ÊÁÏ¿â

ΪÁË¿Ë·þ#rgbÉ«²ÊÉ趨²»¿ÉЯµÄȱµã£¬¶øÇÒʹϵͳ¸üÒ×ì¶Ê¹Ó㬣ØʹÓÃÒ»¸ö´¢´æÉ«²ÊÃû³Æ¼°ÆäÏà¹ØÖ®rgb ÖµµÄ×ÊÁÏ¿â¡£

³ý·ÇÄãµÄϵͳÔÚ×°ÉèÖ®áá×÷ÁËÃ÷ÏԵظı䣬Ӧ¸Ã»áÓÐÒ»¸ö/usr/lib/x11/rgb.txtµÄÎÄ×ÖµµËµÃ÷×ÊÁÏ¿âµÄÄÚÈÝ¡£Õâ¸öµµµÄÇ°ÊýÐÐÀàËÆ춣º

112 219 147 aquamarine £¨ÂÌÓñÉ«¡¢±ÌÂÌÉ«£©
50 204 153 medium aquamarine £¨ÖжȱÌÂÌÉ«£©
50 204 153 Medium Aquamarine £¨ÖжȱÌÂÌÉ«£©
0 0 0 black £¨ºÚÉ«£©
0 0 255 blue £¨À¶É«£©
95 159 159 cadet blue £¨Ñ§ÉúÀ¶£©

ÿһÐÐÇ°Èý¸öÊý×Ö±íʾrgb µÄÔªËØÖµ£¬µ«ÔÚ´ËÊýÖµÊÇ10½øλµÄ£¬ÇÒÖ»´Ó0µ½255 £¬255 ´ú±íÉ«²Ê×î´óÇ¿¶È£¬µÚËĸö²¿·ÝΪɫ²ÊÃû³Æ£¬ÔÊÐíÃû³ÆÖмäÓпոñ¡£

Äã¿ÉÒÔÓóÌʽ$TOP/rgb/rgb½«´ËÎÄ×Öµµ×ª»»ÎªÄÚ²¿µÄÐÎʽ£¬£¨µ±ÄãµÄ£Øϵͳ½¨Á¢Ê±£¬Ëü²¢²»»á±»×°É裩¡£ËùÒÔ£¬ÒªÔÚÄãµÄ×ÊÁÏ¿âÖмÓÈëÒ»¸öеÄÉ«²Ê£¬ÏÈÓÃÎÄ×ֱ༭Æ÷½«É«²ÊÊäÈërgb.txt µµ£¬È»á᣺

venus% cd usr/lib/x11
venus% $TOP/rgb/rgb < rgb.txt

ÊÂʵÉÏ£¬rgb ²¢²»ÐèҪÿ´Î¾ùÖؽ¨ÄÚ²¿×ÊÁϿ⣬ֻÐè¼ÓÈëÐÂÔö£¨»òÐ޸ģ©µÄÏîÄ¿¼´¿É£¬ËùÒÔÄã¿ÉÒÔÓñê×¼ÊäÈëÀ´ÊäÈëÉ«²Ê£º

venus% $TOP/rgb/rgb
255 50 50 mypink
¡­

ÒòΪûÓÐÈκαê×¼µÄ¹¤¾ß³Ìʽ¿ÉÒÔ²éѯÄÚ²¿×ÊÁÏ¿âµÄÄÚÈÝ£¬Òò´ËÉÏÃæµÄ×÷·¨»áÔì³Érgb.txt ºÍÄÚ²¿µÄ×ÊÁÏ¿â²»Ò»Ö£¬ËùÒÔ»¹ÊÇÒÔÐÞ¸Ärgb.txt µÄ·½Ê½Îª¼Ñ¡£


13.7 ½áÂÛ

±¾ÕÂÄãÒѾ­¿´µ½ÈçºÎÃüÃûºÍ´¢´æ×ÖÐÍ£¬ÄãÈçºÎÕÒµ½¿ÉÓõÄ×ÖÐͼ°×ÖÐ͵ÄÄÚÈÝ£¬ÔÚ£ØÓ¦ÓóÌʽÖÐÈçºÎʹÓÃ×ÖÐÍ£¬ºÍÈçºÎÔÚÄãµÄϵͳÖмÓÈëеÄ×ÖÐÍ¡£

×îááÒ»½ÚÔòÃèÊöÁˣصÄÉ«²ÊÃüÃûÔ­Ôò£¬É«²Ê×ÊÁÏ¿âºÍÈçºÎ¼ÓÈëÄã×Ô¼ºµÄÉ«²Ê¡£

ÕâÀïËùÃèÊöµÄ¹«ÓóÌʽֻ°üº¬core°æ£¬contrib °æ°üº¬¸ü¶àµÄÈíÌ壬ÀýÈçÓÐÒ»¸ö½Ð×öxcolors µÄ³Ìʽ£¬Ëü¿ÉÒÔ½¨Á¢Ò»¸öÊÓ´°£¬²¢ÔÚÆäÖÐÏÔʾÔÚÄãϵͳÉÏÒÑÃüÃûµÄÉ«²Ê¡£

¶àÖÖµÄ×ÖÐͺÍÉ«²ÊÔÚÄãµÄÓ©Ä»ÉϳöÏÖÊÇÒ»ÖÖ³å»÷£¬½ÓÏÂÀ´Äã»á¿´µ½¸ü¶àµÄÊÓ´°ÏµÍ³µÄ¹¦ÄÜ£¬²¢¡õÊÔµ÷ÕûʹÆäÊʺÏÄ㹤×÷µÄÏ°¹ß¼°Æ·Î¶¡£

ÏÂÒ»ÕÂÎÒÃǽ«¼ÌÐø¶¨ÖÆÕâ¸öϵͳ£¬¸æËßÄãÈçºÎÀûÓãصÄλԪӳÏñ¹«ÓóÌʽÀ´½¨Á¢¡¢±à¼­ºÍʹÓÃÓ°Ïñ¡£