NTU2CJK v1.2 INTRODUCTION This utility produces PostScript Type 1 fonts for use with the CJK package written by Werner Lemberg . The font sources are Big 5 encoded Chinese NTU TrueType fonts. MANIFEST History -- A simple history of ntu2cjk. README -- This file. Makefile -- Makefile for GNU make. ntu2cjk.c -- NTU TrueType font to PostScript Type 1 fonts converter. It is based on ttf2ps.c, which was written by Liangsheng Wu . ntu2cjk.exe -- executable for DOS and OS/2 t1asm.c t1binary.c -- source files taken from the t1utils package. t1asm.exe t1binary.exe-- executables for DOS and OS/2 getafm -- Script file (for UNIX) for obtaining the AFM file. Used in conjunction with getafm.ps . getafm.bat getafm.cmd -- Batch files (for DOS and OS/2) for obtaining the AFM file. Used in conjunction with getafm.ps . getafm.ps -- PS file to get AFM file from PFB or PFA font. It was modified by Robert Joop . vmusage vmusage.bat vmusage.cmd -- Script file (for UNIX) and batch file (for DOSand OS/2) for estimating VMusage of a font. Used in conjunction with vmusage.ps . vmusage.ps -- PS file for estimating the %%VMusage field in Type 1 fonts. vmmodify.c -- used in conjunction with vmusage to calculate the %%VMusage field in Type 1 fonts. vmmodify.exe-- executable for DOS and OS/2 gen_map gen_map.bat gen_map.cmd -- Unix script and DOS/OS2 batch files to generate the Fontmap and psfonts.map file. UBg5.fd -- Sample .fd file. UBg5.fdx -- Sample .fd file if you also produce extended fonts. rm.bat rm.cmd -- Batch files (for DOS and OS/2) emulating the UNIX command `rm -f' NECESSARY PACKAGES 0. To install automatically you need GNU make (tested with version 3.71). To compile you need the GNU C compiler (tested with version 2.5.8). To use the precompiled binaries for DOS and OS/2 you need the emx runtime package emxrsx.zip (to be found on the CTAN archives in tex-archive/systems/msdos/emtex). 1. The NTU TrueType fonts. These fonts can be obtained from the Chinese Community Information Center (CCIC) of IFCSS at ftp.ifcss.org [128.123.1.55] or its mirror sites, cnd.org [132.249.229.100] and nctuccca.edu.tw [140.111.3.21] via anonymous ftp, in the directory /pub/software/fonts/big5/ms-win on IFCSS or /pub/chinese/ifcss.org/fonts/big5/ms-win on nctuccca.edu.tw . 2. The GhostScript package. On CTAN: DOS: tex-archive/support/ghostscript/aladdin/gs3XX*.zip UNIX: /ghostscript-3.XX*.gz where XX is the sub-version number. 3. The DVIPS package. On CTAN: DOS: tex-archive/systems/msdos/dviware/dvips/dvips558.pc/dps558b.zip UNIX: tex-archive/dviware/dvips INSTALLATION 1. Modify the contents in the Makefile according to the information of your own site, especially for those variables which are platform-dependent. 2. Make sure that GS (ghostscript) and DVIPS are installed. 3. Make the programs and fonts with GNU make saying make to see the default information, or, as an example, make dos PLANES="01 02 03" to make the first three CJK sub-fonts under DOS with djgpp. Note that it will take hours if you make all the sub-fonts on a 386 PC. To make all CJK sub-fonts from a NTU font under UNIX, just type make unix 4. Install the produced files with make install 5. If you want to install the fonts manually instead of saying 'make install', in addition to copy all the created .pfb and .tfm files to appropriate directory, you also need to modify the contents of the files 'Fontmap' (for use with GS) and 'psfonts.map' (to be used with dvips) in their installed directories. You can use the script gen_map (or gen_map.bat for DOS) to create parts of Fontmap and psfonts.map which can then be appended to the corresponding files afterwards. For example, say gen_map KaiSu b5ka psfonts.map Fontmap to append font map entries (as described below) to the corresponding files if the files exist or to create these two files if they are nonexistent. Gen_map will not overwrite existing entries and will just pass if fonts are already defined in these map files. Alternatively, you can create them by hand. For instance, if the prefix name of the font files is "b5ka", and the prefix of PostScript fontnames is "KaiSu", append the following lines (55 lines) to the Fontmap file: /KaiSu01 (b5ka01.pfb) ; ... /KaiSu55 (b5ka55.pfb) ; and the following lines (55 lines) to psfonts.map: b5ka01 KaiSu01 ... b5ka55 KaiSu55 if you also want to use the extended fonts (only the .tfm files) and suppose the prefix for extended fonts is "b5kax", append the following lines (55 lines) also to psfonts.map: b5kax01 KaiSu01 "1.2 ExtendFont" ... b5kax55 KaiSu55 "1.2 ExtendFont" Again, you can use gen_map to generate the entries, just say gen_map KaiSu b5kax psfonts.map 6. Modify UBg5.fd for suiting your LaTeX environment. If you set the variable EXTENDED_FONTS to YES in Makefile, you can rename UBg5.fdx to UBg5.fd and change the contents accordingly. Then copy it to the directory where the file Big5.enc is stored. That's it. Enjoy! REMARKS 1. This package is not tested thoroughly on PC. In fact the author built these CJK fonts only on HP 9000/730 and on Linux. It takes about 10 minutes to process one NTU font on the HP. Some of the sub-fonts will probably not be loaded by GS in the PFB format. This leads to the fact that not all AFM files can be made (as well as the TFM files). (I'm not sure where the problem is, maybe in PFB or in GS:-<. At least, now I can make all sub-fonts without errors using GS3.12 and GS3.33) In this case, replace the specific entries in the Fontmap file with the PFA fonts, remove corresponding AFM and TFM files (or do `make clean' on the corresponding sub-font), and remake the sub-font again. For example, if b5ka01.pfb can't be loaded by GS, replace /Kaisu01 (b5ka01.pfb) ; with /Kaisu01 (b5ka01.pfa) ; in the Fontmap file. Remove b5ka01.tfm and b5ka01.afm either manually or by typing make clean PLANES=01 and then type make unix PLANES=01 (or 'make dos PLANES=01') to remake it. This should work (if this doesn't work :-(((...). 2. If you want create extended fonts (1.2 times in width), make sure that the setting of the variable EXTENDED_FONTS is set to YES. These `virtual fonts' (no .vf fonts created, there are just related .tfm files created) are based on the corresponding normal fonts and can be used in conjunction with UBg5.fdx (you must rename it to UBg5.fd and modify accordingly). 3. The settings of Fontmap and psfonts.map in this version are simulations of printers with resident PostScript fonts. In the current version of dvips, if you set these fonts as non-resident fonts, i.e. in the psfonts.map if you set each entry as: b5ka01 KaiSu01 < b5ks01.pfb the created output file by dvips would be vary large in size (including about twenty .pfb fonts for a small chinese document). Although it is "portable" and self-contained, this is not what we expect. Fortunately, the author of dvips, Tomas Rokicki (rokicki@cs.standford.edu), is now engaged in solving this problem. The new release of dvips will then load only used characters from PostScript fonts on demand, just as it now does with .pk fonts. ACKNOWLEDGEMENT Many thanks to Werner Lemberg, he gives me lots of suggestions and maintains parts of this package. Thanks to Sam Chiu , he pays attentions to this package and suggests me a lot. Also thanks to those who give their efforts to this field so I can typeset high quality of documents. THE AUTHOR Chun-Yu Lee e-mail: d791013@ce.ntu.edu.tw chunylee@pc2.hinet.net