From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199612312107.OAA19022@ellpspace.math.ualberta.ca> Date: Tue, 31 Dec 1996 14:07:41 -0700 (MST) From: Michal Jaegermann Subject: Re: using PostScript fonts in LaTeX In-Reply-To: > > I've got a ton of Type 1 > fonts on a Windows machine that I've been meaning to get working under > TeX. I'd be nice if I could use them under X and GhostScript, too. This is not exactly axp issue, but... Consider this a Xmas gift. :-) Using new fonts in GhostScript is rather trivial matter. Just drop them (or links to them, safer) into its path and edit Fontmap file. Later entries clobber earlier ones, so you do not even have to bother to remove something which points Times-Roman to URW Nimbus Roman, for example; the later one is what counts. 'gs -h' will show you path used by ghostscript, among other things. An alternate method is to give absolute locations of your extra fonts in Fontmap, but if you will move something then you have to remember to update this file. Here is an account how I made ghostcript fonts (Type1) avaialable to X server. This can be used, with small modifications, with any Type1 fonts, from whatever a source, which you have on hand. First I created a directory /usr/local/lib/type1_fonts, to keep everything out of rpm harm way, and filled it with links to .pf{ab} and .afm files which I wanted. So I ended up there with a stuff like: a010013l.afm a010013l.pfb a010015l.afm a010015l.pfb .... and so on. Next I used the following Perl program to create a skeleton fonts.scale file. It is far from beeing perfect. Installing new fonts is not done often enough to get very deeply into parsing pfa and pfb files, but editing results surely beats creating everything by hand from scratch. Here it is for yours further improvements and use: #!/usr/bin/perl # # Helper program to prepare entries for fonts.scale file for Type1 fonts # Expects .pfa or .pfb file names as its input # # Michal Jaegermann, 1996-12-1 # $outfile = "fonts_scale.tmp"; $fndry = "urw"; # for now, change to whatever you fancy $fmly = ""; $wght = ""; # black, bold, demibold, medium, regular $slant= ""; # i, o, r $sWdth= "normal"; # normal, semicondensed $fill = "-0-0-0-0"; $spc = ""; # c, m, p - 'c' is constant, 'm' is monospaced, really # the same thing; 'p' is proportional $tail = "0-iso8859-1"; $count = 0; open (OUT, ">$outfile") or die "cannot write to $outfile: $!\n"; while ($infile = shift) { open (IN, $infile) or die "cannot read $infile: $!\n"; while () { chomp; if (/FamilyName/) { ($fmly = lc $_) =~ s/.*\((.*)\).*/$1/; } if (/Weight/) { ($wght = lc $_) =~ s/.*\((.*)\).*/$1/; } if (/ItalicAngle/) { $_ = (split ' ', $_)[1]; $slant = (0 == $_ ? 'r' : 'i'); } if (/isFixedPitch/) { $_ = (split ' ', $_)[1]; $spc = ('true' eq $_ ? 'm' : 'p'); } last if /currentdict end/; } close IN; $count += 1; print OUT "$infile -$fndry-$fmly-$wght-$slant-$sWdth-$fill-$spc-$tail\n"; } print OUT "$count\n"; exit 0; __END__ I fed to it all my '*.pf?' files as arguments and after editing results with an editor I got this 'fonts.scale': 35 a010013l.pfb -urw-gothic-medium-r-normal--0-0-0-0-p-0-iso8859-1 a010015l.pfb -urw-gothic-demibold-r-normal--0-0-0-0-p-0-iso8859-1 a010033l.pfb -urw-gothic-medium-i-normal--0-0-0-0-p-0-iso8859-1 a010035l.pfb -urw-gothic-demibold-i-normal--0-0-0-0-p-0-iso8859-1 b018012l.pfb -urw-bookman-regular-r-normal--0-0-0-0-p-0-iso8859-1 b018015l.pfb -urw-bookman-bold-r-normal--0-0-0-0-p-0-iso8859-1 b018032l.pfb -urw-bookman-regular-i-normal--0-0-0-0-p-0-iso8859-1 b018035l.pfb -urw-bookman-bold-i-normal--0-0-0-0-p-0-iso8859-1 c059013l.pfb -urw-century schoolbook-regular-r-normal--0-0-0-0-p-0-iso8859-1 c059016l.pfb -urw-century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1 c059033l.pfb -urw-century schoolbook-regular-i-normal--0-0-0-0-p-0-iso8859-1 c059036l.pfb -urw-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1 d050000l.pfb -urw-dingbats-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific n019003l.pfb -urw-nimbus sans-regular-r-normal--0-0-0-0-p-0-iso8859-1 n019004l.pfb -urw-nimbus sans-bold-r-normal--0-0-0-0-p-0-iso8859-1 n019023l.pfb -urw-nimbus sans-regular-i-normal--0-0-0-0-p-0-iso8859-1 n019024l.pfb -urw-nimbus sans-bold-i-normal--0-0-0-0-p-0-iso8859-1 n019043l.pfb -urw-nimbus sans-regular-r-semicondensed--0-0-0-0-p-0-iso8859-1 n019044l.pfb -urw-nimbus sans-bold-r-semicondensed--0-0-0-0-p-0-iso8859-1 n019063l.pfb -urw-nimbus sans-regular-i-semicondensed--0-0-0-0-p-0-iso8859-1 n019064l.pfb -urw-nimbus sans-bold-i-semicondensed--0-0-0-0-p-0-iso8859-1 n021003l.pfb -urw-nimbus roman-regular-r-normal--0-0-0-0-p-0-iso8859-1 n021004l.pfb -urw-nimbus roman-bold-r-normal--0-0-0-0-p-0-iso8859-1 n021023l.pfb -urw-nimbus roman-regular-i-normal--0-0-0-0-p-0-iso8859-1 n021024l.pfb -urw-nimbus roman-bold-i-normal--0-0-0-0-p-0-iso8859-1 n022003l.pfb -urw-nimbus mono-regular-r-normal--0-0-0-0-m-0-iso8859-1 n022004l.pfb -urw-nimbus mono-bold-r-normal--0-0-0-0-m-0-iso8859-1 n022023l.pfb -urw-nimbus mono-regular-i-normal--0-0-0-0-m-0-iso8859-1 n022024l.pfb -urw-nimbus mono-bold-i-normal--0-0-0-0-m-0-iso8859-1 p052003l.pfb -urw-palladio-regular-r-normal--0-0-0-0-p-0-iso8859-1 p052004l.pfb -urw-palladio-bold-r-normal--0-0-0-0-p-0-iso8859-1 p052023l.pfb -urw-palladio-regular-i-normal--0-0-0-0-p-0-iso8859-1 p052024l.pfb -urw-palladio-bold-i-normal--0-0-0-0-p-0-iso8859-1 s050000l.pfb -urw-symbol-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific z003034l.pfb -urw-chancery-medium-i-normal--0-0-0-0-p-0-iso8859-1 Subseqently I run mkfontdir (the manual says that for scaled fonts this is really equivalent to 'cp fonts.scale fonts.dir', but just in case :-), added /usr/local/lib/type1_font to FontPath in my XF86Config file and restarted X server. That is about it. Start your 'xfontsel' and preview what you got. Have fun with your fonts, Michal -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com