From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- fonts/psfonts/tools/make-one.pl | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 fonts/psfonts/tools/make-one.pl (limited to 'fonts/psfonts/tools/make-one.pl') diff --git a/fonts/psfonts/tools/make-one.pl b/fonts/psfonts/tools/make-one.pl new file mode 100644 index 0000000000..18e6238e76 --- /dev/null +++ b/fonts/psfonts/tools/make-one.pl @@ -0,0 +1,61 @@ +#!/tool/bin/perl +# +# This script converts an Adobe Font Metric file for a special font to +# TeX font metric, and installs it in a distribution directory. It uses +# afm2tfm. +# +# (c) Sebastian Rahtz June 6th 1994 +# revised December 11 1995 +# converted to Perl January 23rd 1997 +# +$filedate="1997/09/17"; +$fileversion="1.2"; +use English; +use Getopt::Long; +use File::Basename; +use Cwd; +require "famtool.pl"; +$opt_debug=0; +$result = GetOptions ( +"debug!", +"download!",# means that the lines written to psfonts. have " 0; + +# Parameters: +# $1 The font name, eg psyr +$thisfont=$ARGV[0]; +&Setup($thisfont); +# +$AFMfile=`kpsewhich $thisfont.afm`; +chop($AFMfile); +if ($AFMfile eq "") { die "cannot find $thisfont.afm"; } +system("afm2tfm $AFMfile $thisfont.tfm "); +$FontName=&readAFMfile($AFMfile); +open(MAP,">$Outdir/dvips/$Famcode.map"); +print MAP "$thisfont $FontName "; +if ($opt_download) { print MAP " <$thisfont.pfb"; } +print MAP "\n"; +close(MAP); +open CONFIG,">$Outdir/dvips/config.$Famcode"; +print CONFIG "p +$Famcode.map\n" ; +close CONFIG; +open (FD,">$Outdir/tex/u$Famcode.fd"); +print FD "\\ProvidesFile{u$Famcode.fd}\n"; +print FD " [$year/$mon/$mday font definitions for U/$Famcode.]\n"; +print FD "\\DeclareFontFamily{U}{$Famcode}{}\n"; +print FD "\\DeclareFontShape{U}{$Famcode}{m}{n}{<->$thisfont}{}\n" ; +print FD "\\endinput\n"; +close FD; +&install_symbol_README; +print "Installing metric files in $Outdir/tfm and vf\n" if $opt_verbose; +&installMetrics; +rmdir("$Outdir/vf"); +&Cleanup; +print "Done\n" if $opt_verbose; -- cgit v1.2.3