[6779] | 1 | Scripts to support CJK-LaTeX |
---|
| 2 | |
---|
| 3 | by Mike Fabian |
---|
| 4 | <mfabian@suse.de> |
---|
| 5 | |
---|
| 6 | The tiny Perl-script 'sfd2map' converts .sfd files (as used by |
---|
| 7 | CJK-LaTeX) to .map files (as used by ttf2pt1). |
---|
| 8 | |
---|
| 9 | Actually I currently don't use that script stand-alone for performance |
---|
| 10 | reasons. |
---|
| 11 | |
---|
| 12 | Currently I use such a conversion in another small script 'cjk-latex-config' |
---|
| 13 | (attached as well) which creates .tfm files usable with CJK-LaTeX |
---|
| 14 | from TrueType fonts as listed in /etc/ttf2pk/ttfonts.map. When called like |
---|
| 15 | cjk-latex-config --type1 |
---|
| 16 | this script will use ttf2pt1 to generate .pfb files as well from these TrueType |
---|
| 17 | fonts to be used with CJK-LaTeX. |
---|
| 18 | |
---|
| 19 | The .sfd files cannot be directly used as input to ttf2pt1 because the |
---|
| 20 | format of the .map files which ttf2pt1 expects is slightly different, |
---|
| 21 | therefore I made the 'sfd2map' converter script. |
---|
| 22 | |
---|
| 23 | But then I noticed that I would have to parse the generated map file |
---|
| 24 | *again* to get a list of the plane numbers to use. That seemed to be a |
---|
| 25 | bit wastful because I had just parsed the .sfd file to convert it to |
---|
| 26 | .map, therefore I included sfd2map as a function in 'cjk-latex-config' |
---|
| 27 | as well and collected the plane numbers during the conversion. |
---|
| 28 | |
---|
| 29 | But 'cjk-latex-config' is maybe a little bit SuSE specific, therefore |
---|
| 30 | I kept 'sfd2map' also as a standalong script. Use it if you like. |
---|
| 31 | |
---|
| 32 | 'cjk-latex-config' calls another small script 'cjk-latex-t1mapgen' |
---|
| 33 | to generate a cjk-latex.map file containing something like |
---|
| 34 | cyberb00 BitstreamCyberbit-Roman-00 <cyberb00.pfb |
---|
| 35 | cyberb01 BitstreamCyberbit-Roman-01 <cyberb01.pfb |
---|
| 36 | cyberb02 BitstreamCyberbit-Roman-02 <cyberb02.pfb |
---|
| 37 | [...] |
---|
| 38 | after all .pfb files have been generated. |
---|
| 39 | |
---|
| 40 | Maybe this is also SuSE specific, I'm not sure about in what |
---|
| 41 | directories the relevant files are stored on other Linux-like systems. |
---|
| 42 | |
---|
| 43 | I'm not yet sure whether they work on other systems beside SuSE Linux. |
---|
| 44 | They have hard coded path names where to find the TrueType fonts, |
---|
| 45 | ttfonts.map, the TeX fonts etc and cjk-latex-config checks |
---|
| 46 | whether freetype-tools.rpm is installed. freetype-tools.rpm might |
---|
| 47 | have another name for other distributions and for distributions |
---|
| 48 | which don't use rpm this check can't work anyway. |
---|
| 49 | |
---|
| 50 | These are small details and it should not be difficult to adapt the |
---|
| 51 | scripts for other Linux-like systems though. |
---|