diff options
author | wlemb <wlemb> | 2003-01-21 14:08:22 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2003-01-21 14:08:22 +0000 |
commit | 9b47c620f4ba56c07489374dfe66db4bf73bc489 (patch) | |
tree | fb312577a051dee0120650bb638fe04ac0ae1907 /src/utils | |
parent | d3ffc69baebafa300df2f000d28950738fa4b147 (diff) | |
download | groff-9b47c620f4ba56c07489374dfe66db4bf73bc489.tar.gz |
* src/utils/afmtodit/afmtodit.pl: Add switch `-m' to suppress
negative left italic correction.
* src/utils/afmtodit/afmtodit.man: Document it.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/afmtodit/afmtodit.man | 94 | ||||
-rw-r--r-- | src/utils/afmtodit/afmtodit.pl | 10 |
2 files changed, 61 insertions, 43 deletions
diff --git a/src/utils/afmtodit/afmtodit.man b/src/utils/afmtodit/afmtodit.man index 2d4c8661..2ac32729 100644 --- a/src/utils/afmtodit/afmtodit.man +++ b/src/utils/afmtodit/afmtodit.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -41,21 +41,23 @@ afmtodit \- create font files for use with groff \-Tps .ti \niu .B afmtodit .de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" .. . -.OP \-nsv +.OP \-mnsv +.OP \-a n .OP \-d desc_file .OP \-e enc_file .OP \-i n -.OP \-a n .I afm_file .I map_file .I font .br .ad \na . +.LP +The whitespace between an command line option and its argument is optional. . .SH DESCRIPTION .B afmtodit @@ -153,24 +155,24 @@ These parameters are normally needed only for italic (or oblique) fonts. . .SH OPTIONS .TP -.B \-v -Print version. -. .TP -.B \-n -Don't output a -.B ligatures -command for this font. -. -Use this with constant-width fonts. +.BI \-a n +Use +.I n +as the slant parameter in the font file; +this is used by groff in the positioning of accents. . -.TP -.B \-s -The font is special. +By default +.B afmtodit +uses the negative of the ItalicAngle specified in the afm file; +with true italic fonts it is sometimes desirable to use +a slant that is less than this. . -The effect of this option is to add the -.B special -command to the font file. +If you find that characters from an italic font have accents +placed too far to the right over them, +then use the +.B \-a +option to give the font a smaller slant. . .TP .BI \-d desc_file @@ -190,32 +192,13 @@ is described in .BR grops (@MAN1EXT@). . .TP -.BI \-a n -Use -.I n -as the slant parameter in the font file; -this is used by groff in the positioning of accents. -. -By default -.B afmtodit -uses the negative of the ItalicAngle specified in the afm file; -with true italic fonts it is sometimes desirable to use -a slant that is less than this. -. -If you find that characters from an italic font have accents -placed too far to the right over them, -then use the -.B \-a -option to give the font a smaller slant. -. -.TP .BI \-i n Generate an italic correction for each character so that the character's width plus the character's italic correction is equal to .I n thousandths of an em -plus the amount by which the right edge of the character's bounding +plus the amount by which the right edge of the character's bounding box is to the right of the character's origin. . If this would result in a negative italic correction, use a zero @@ -238,7 +221,9 @@ thousandths of an em plus the amount by which the left edge of the character's bounding box is to the left of the character's origin. . -The left italic correction may be negative. +The left italic correction may be negative unless option +.B \-m +is given. . .IP This option is normally needed only with italic (or oblique) fonts. @@ -247,6 +232,35 @@ The font files distributed with groff were created using an option of .B \-i50 for italic fonts. . +.TP +.B \-m +Prevent negative left italic correction values. +. +Roman font files distributed with groff were created with +.B \-i0\ \-m +to improve spacing with +.BR @g@eqn (@MAN1EXT@). +. +.TP +.B \-n +Don't output a +.B ligatures +command for this font. +. +Use this with constant-width fonts. +. +.TP +.B \-s +The font is special. +. +The effect of this option is to add the +.B special +command to the font file. +. +.TP +.B \-v +Print version. +. . .SH FILES .Tp \w'\fB@FONTDIR@/devps/download'u+2n diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl index 67c0f682..ec551e95 100644 --- a/src/utils/afmtodit/afmtodit.pl +++ b/src/utils/afmtodit/afmtodit.pl @@ -1,6 +1,6 @@ #! /usr/bin/perl # -*- Perl -*- -# Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -23,7 +23,7 @@ $prog = $0; $prog =~ s@.*/@@; do 'getopts.pl'; -do Getopts('ve:sd:i:a:n'); +do Getopts('a:d:e:i:mnsv'); if ($opt_v) { print "GNU afmtodit (groff) version @VERSION@\n"; @@ -31,7 +31,8 @@ if ($opt_v) { } if ($#ARGV != 2) { - die "Usage: $prog [-nsv] [-d DESC] [-e encoding] [-i n] [-a angle] afmfile mapfile font\n"; + die "usage: $prog [-mnsv] [-a angle] [-d DESC] [-e encoding]\n" . + " [-i n] afmfile mapfile font\n"; } $afm = $ARGV[0]; @@ -284,6 +285,9 @@ for ($i = 0; $i < 256; $i++) { $subscript_correction = $italic_correction if $subscript_correction > $italic_correction; $left_math_fit = $left_side_bearing{$ch} + $opt_i; + if (defined $opt_m) { + $left_math_fit = 0 if $left_math_fit < 0; + } } if (defined $italic_correction{$ch}) { $italic_correction = $italic_correction{$ch}; |