
Togan Muftuoglu <toganm@dinamizm.com> さんは書きました:
I am trying get my notes together for Fonts ( I know it will never ever be complete). I believe Linux is wasting of disk space when it comes to fonts.
Yes, there are a few duplicates. I'll try to eliminate them when I encounter them. For example Abiword had yet another copy of the URW fonts which are already in the ghostscript-fonts-std package, therfore I deleted the fonts from the Abiword package and replaced them by symbolic links to the fonts in ghostscript-fonts-std.
Anyway I have installed the ghostscript rpms from Mike Fabians directory for SuSE 8.1. ghostscript-fonts-std-7.05.3-99 rpm has a prebuilt "fonts.dir" file under /usr/share/ghostscript/fonts and the encodings in the file do not have iso-8859-9 (Latin5 Turkish). I would like to understand why it does not have (is it because the fonts do not have that encoding or it has not been generated.)
Originally the fonts.dir file in the ghostscript-fonts-std package had only entries for iso8859-1. Long ago I checked manually that these fonts also cover iso8859-2 and iso8859-15 and therefore added these entries. ago. I didn't check whether they completely contain the glyphs necessary for Turkish. Sorry for beeing too lazy ... But thanks to Juliusz Chroboczek we now have 'mkfontscale' which can check this automatically: root@nozomi:/usr/share/ghostscript/fonts# mkfontscale root@nozomi:/usr/share/ghostscript/fonts$ grep -i "nimbus.*mono.*medium-r" fonts.scale n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso8859-1 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso8859-2 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso8859-9 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso8859-13 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso8859-15 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-adobe-standard n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-microsoft-cp1252 n022003l.pfb -urw-Nimbus Mono L-medium-r-normal--0-0-0-0-p-0-iso10646-1 mike@nozomi:/usr/share/ghostscript/fonts$ i.e. the fonts do appear to support iso8859-9 and iso8859-13 as well. I'll extend the /sbin/conf.d/SuSEconfig.fonts script to generate the /usr/share/ghostscript/fonts/fonts.{scale,dir} files automatically using 'mkfontscale' for SuSE Linux >= 8.2.
ttf2pt1-341-19 rpm "This is a collection of tools and scripts that allow to convert True Type Fonts (as used by MS Wind*ws) to be converted to Postscript Type 1 fonts, so they can be used in X11 and Ghostscript"
Is this package really needed I thought Ghostscript were able to print the Truetype fonts.
I think it is mostly not needed anymore, neither for X11 nor for Ghostscript. X11 can use TrueType fonts for quite a long time already and Ghostscript can use TrueType fonts as well. But there are still a few exotic applications where ttf2pt1 is needed. For example CJK-LaTeX cannot use TrueType fonts directly, it needs either .pk fonts or .pfb fonts generated from the TrueType fonts. '/usr/sbin/cjk-latex-config --type' generates .pfb fonts for use with CJK-LaTeX using ttf2pt1.
If so what would be the easy way to add the truetype fonts and their aliases (Like Fontmap.ttf and add this to "/usr/share/ghostscript/7.05/lib/Fontmap" )
Yes, you can add Fontmap.ttf to /usr/share/ghostscript/7.05/lib/Fontmap like this: root@nozomi:/usr/share/ghostscript/7.05/lib# cat Fontmap %! % See Fontmap.GS for the syntax of real Fontmap files. (Fontmap.GS) .runlibfile (Fontmap.kanji) .runlibfile (Fontmap.rus) .runlibfile (Fontmap.CID) .runlibfile (Fontmap.greek) .runlibfile (Fontmap.ttf) .runlibfile root@nozomi:/usr/share/ghostscript/7.05/lib# and create a /usr/share/ghostscript/7.05/lib/Fontmap.ttf containing the TrueType fonts you want to use, for example: root@nozomi:/usr/share/ghostscript/7.05/lib# cat Fontmap.ttf /LuxiSerif (/usr/X11R6/lib/X11/fonts/truetype/luxirr.ttf) ; root@nozomi:/usr/share/ghostscript/7.05/lib# The name behind the / at the beginning is the PostScript name, i.e. you can use this font in PostScript for example like this: mike@nozomi:/tmp$ cat ttt.ps % -*- coding: iso-8859-1 -*- /LuxiSerif findfont 30 scalefont setfont 50 200 moveto (Grüß Gott!) show showpage mike@nozomi:/tmp$ You can find out the "official" PostScript-name of a TrueType-font with 'ftdump': root@nozomi:/usr/share/ghostscript/7.05/lib# ftdump /usr/X11R6/lib/X11/fonts/truetype/luxirr.ttf | grep PostScript PostScript name: LuxiSerif root@nozomi:/usr/share/ghostscript/7.05/lib# -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。