[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65619] [afmtodit] want a default value for space width if unspecif
From: |
Deri James |
Subject: |
[bug #65619] [afmtodit] want a default value for space width if unspecified |
Date: |
Thu, 2 May 2024 05:54:36 -0400 (EDT) |
Follow-up Comment #3, bug #65619 (group groff):
Afmtodit has always used the width of the space glyph (if defined in the
font), what your change did was enable this to be overridden on the command
line, which is probably wrong. If the intention was to provide a fallback
value when a spacewidth was not present, the logic could have been written
that way.
A useful change to afmtodit would be to look for other space glyphs in the
font (u0020 and u00A0) if space is not found, then if none are found, use the
value given on the command line, and if that is missing, it is not a special
font, warn user the font will be unusable in groff and suggest they rerun
afmtodit with a suitable -w flag.
This was Branden's change:-
+my $sw = 0;
+$sw = conv($width{"space"}) if defined $width{"space"};
+$sw = $space_width if ($space_width);
+
print("name $name\n");
print("internalname $psname\n") if $psname;
print("special\n") if $opt_s;
printf("slant %g\n", $italic_angle) if $italic_angle != 0;
-printf("spacewidth %d\n", conv($width{"space"})) if defined $width{"space"};
+printf("spacewidth %d\n", $sw) if $sw;
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65619>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/