Notesx 1) You need to have the "fonts.alias" file, to put in the same directory of those .bdf/.snf/.pcf files, before you run "mkfontdir". 2) GB2312-80 refers to the Standard "Code of Chinese Graphic Character for Information Interchange, Primary Set (GB2312-80)", published by National Standards Bureau, Beijing, China in 1980. 3) GR/GL encoding: for GR, the most significant bit of each octet of a character in the font is one (1). 4) Here "BIG5 encoding" refers the ETen Big5 encoding, HKU Big5, a corrupted variant of the widely used de facto standard, so-called "Big5", should not be supported. ---------- How to install these fonts in X11R4, X11R5, OpenWindow, and DECwindow: You'd better have a dedicated directory for the fonts. Assuming ~/xfonts in the following illustration. (~ for your home directory.) *** In X11R4: To install the fonts in MIT X11R4, use the following commands: % mkdir ~/xfonts % mv *.bdf.Z 8x18.bdf fonts.alias ~/xfonts % cd ~/xfonts % bdftosnf -t 8x18.bdf > 8x18.snf % zcat gb16fs.bdf.gz | bdftosnf -t > gb16fs.snf % zcat gb16st.bdf.gz | bdftosnf -t > gb16st.snf % zcat hku-16et.bdf.Z | bdftosnf -t > hku-16et.snf % mkfontdir . inform your X window system by: % xset fp+ ~/xfonts You can also put this line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. *** In X11R5: To install the fonts in MIT X11R5, use the following commands: % mkdir ~/xfonts % mv *.bdf.Z fonts.alias ~/xfonts % cd ~/xfonts % zcat gb16fs.bdf.gz | bdftopcf -t > gb16fs.pcf % zcat gb16st.bdf.gz | bdftopcf -t > gb16st.pcf % zcat hku-16et.bdf.Z | bdftopcf -t > hku-16et.pcf % mkfontdir . inform your X window system by: % xset fp+ ~/xfonts You can also put this line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. *** In (Sun) Open Window 2.0 or 3.0: If you are running X11/NeWS window system server ("xnews"): % mkdir ~/xfonts % mv *.bdf.Z 8x18.bdf ~/xfonts % cd ~/xfonts % uncompress *.bdf.Z % convertfont 8x18.bdf % convertfont -M -n gb16fs -o gb16fs gb16fs.bdf % convertfont -M -n gb16st -o gb16st gb16st.bdf % convertfont -M -n hku-16et -o hku-16et hku-16et.bdf % bldfamily (Note: ignore the error messages by "bldfamily", them won't hurt.) inform your X11/NeWS window system by: % xset fp+ ~/xfonts You can also put this line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. *** In (DECstation) DECwindow: X windows running in DECstations are often the DECwindows. To install the fonts, use the following commands: % mkdir ~/xfonts % mv *.bdf.Z 8x18.bdf fonts.alias ~/xfonts % cd ~/xfonts % dxfc -t < 8x18.bdf > 8x18.pcf % zcat gb16fs.bdf.gz | dxfc -t > gb16fs.pcf % zcat gb16st.bdf.gz | dxfc -t > gb16st.pcf % zcat hku-16et.bdf.Z | dxfc -t > hku-16et.pcf % dxmkfontdir . inform your DECwindow system by: % xset fp+ ~/xfonts You can also put this line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. ---------- Testing and trouble shooting in font installation: After the above installtion steps, you can test it by the following: 1) run % xset q You will see a list of directories under "Font Path:" section. The pathname of your new-added font directory, should appear on the list exactly once. If you cannot find your new-added font directory in the list, your installation failed. It may be caused by: a) you didn't follow the steps to build the font directory (e.g. you forgot to "mkfontdir"); b) you didn't give a *full* path name (the path name which starts from the root as "/....") for "fontdir" in "xset fp+ fontdir"; c) the X server doesn't have the privilege to read your font directory (e.g. X server is not started by you and your directory is protected); d) there are too many directories in the "Font Path:" list (remove some unimportant ones to make rooms for this new one); or e) your font directory is actually in another machine, but that directory is not mounted on the workstation where the X server runs. (In this case, try to put the font files in your workstation. If that is not possible, e.g. in a diskless workstation, or X terminal, ask your system manager for help.) If your font directory appears twice or more. Run % xset fp % xset fp+ your_font_directory and redo the testing again. 2) run % xset fp rehash % xlsfonts The output of the second command is a list of font names. The string "gb16st" should appear in the list exactly once. If you cannot find "gb16st", but you can find something like -cclib-..., you forgot to put "fonts.alias" in your font directory. If you cannot find anything about gb16st, or -cclib- font, you failed to convert the .bdf fonts into the proper format. 3) run % xfd -fn gb16st -start 41216 You should be able to see all the Chinese characters page by page. (All "real" Hanzi starts from the 16th page.) In X11R5 cxterm, the default ASCII font is "8x16". If your system doesn't have it (e.g. you don't see "8x16" in the output of xlsfonts), you should specify an alternative font in cxterm command option "-fn". You may choose '-sony-fixed-medium-r-normal--16-120-*-*-*-*-iso8859-1', or '8x18', or even 'fixed'. ---------- Some other hints from the net: 1) about NCD X terminal From: eddie@jupiter.SLAC.Stanford.EDU (Xintian Eddie Lin) Newsgroups: comp.windows.x Subject: Re: adding font path on a X terminal Message-ID: Date: 11 Oct 92 04:55:00 GMT In article eddie@laslett.SLAC.Stanford.EDU (Xintian Eddie Lin) writes: Hi, there: I am running x server on a NCD x terminal, the trouble I have is xset +fp /u/ap/eddie/myfontsdir giving error message as following: X error of faileed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 51(X_SetFontPath) The fonts.dir is properly built, I suspect I have to do something to the configuration file for the server. Can anyone point me to the right place ? thanks Eddie Lin Thanks for the kind replies, I finally figured it out: the fonts are loaded on NCD by tftp from a font server, and on that font server /etc/tftpaccess.ctl should contain all the directories tftp has access privilege to, so add your new font dir to it. and BTW, don't forget to use ncdbdftosnf to get .snf fonts. credits goes to Len Sweeney and michael pearlman who also suggests that .snf and .pcf fonts may screw X11R5 and X11R4; compression scheme is also relevant. ( it's for the info of those who suffered the similiar symptoms ) Eddie Lin -- ---------- Some changes in this directory: * 8x18big5.bdf, a 8x16 font which is used to match with Hku-16et.bdf.Z, is removed. The matching font for the new hku-16et.bdf.Z can be either 8x18.bdf or 8x16.bdf (standard X11 font).