gbranden pushed a commit to branch master
in repository groff.
commit 74501979860cda474908f534ab67bf33a6bedb87
Author: Deri James <[email protected]>
AuthorDate: Fri Jun 20 10:29:22 2025 +0000
[devpdf,gropdf]: Support `SS` slanted-symbol font.
Replace pseudo-slanted characters with a real font, improving typography
of, e.g., slanted lowercase Greek letters as used in eqn(1).
* font/devpdf/DESC.in: Mount new font `SS` prior to `S`.
* font/devpdf/SS: New file describes new slanted-symbol font. The
metrics are hand-tweaked. We can't run afmtodit on the symbolsl.afm
file in grops because it produces incorrect metrics--the width/height
values do not take into account the rescaling of the glyph sizes by
.89.
* font/devpdf/StandardSymSL.pfb: New PostScript font supplies slanted
versions of glyphs in the standard Symbol font.
* font/devpdf/devpdf.am (GROFF_FONT_FILES): Update macro definition to
scan the build directory for file names matching font descriptions,
excluding both symbol fonts. Relocate definition to be closer to use.
(devpdffont_DATA): Add new files "SS", "StandardSymSL.pfb", and
"download.in".
(font/devpdf/SS): New target is generated by copying from source tree
to build tree if they differ. As a side effect, also copy
"StandardSymSL.pfb".
(font/devpdf/util/BuildFoundries): Copy "download.in" file from source
tree to build tree with new name "download".
(font/devpdf/download): Set write permission on the target to work
around GNU Automake "distcheck" feature that makes make(1)-generated
files read-only; however we want "BuildFoundries" to rewrite the file
in place.
(mostlyclean_devpdf_extra): Clean the new files "SS" and
"StandardSymSL.pfb", as well as "S" since the new regex used to
populate the `GROFF_FONT_FILES` now overlooks it.
(install_devpdf, uninstall_devpdf): Explicitly handle "S" font
description file since the new regex used to populate the
`GROFF_FONT_FILES` now overlooks it.
* src/devices/gropdf/gropdf.pl: Support multiple specifications of `-F`
option, populating new list `fdlist`. Use the runtime path separator
to populate scalar `fd` if `fdlist` is not a singleton.
* tmac/pdf.tmac: Drop all 28 calls of `pdf:SS` macro for 24 lowercase
Greek letters and 4 variant forms; the slanted-symbol font now
supplies these.
Fixes <https://savannah.gnu.org/bugs/?65098>.
---
ChangeLog | 45 +++++++++++++++++++++++++++++++++++++
font/devpdf/DESC.in | 2 +-
font/devpdf/SS | 50 ++++++++++++++++++++++++++++++++++++++++++
font/devpdf/StandardSymSL.pfb | Bin 0 -> 14534 bytes
font/devpdf/devpdf.am | 35 ++++++++++++++++++++++++-----
font/devpdf/download.in | 1 +
src/devices/gropdf/gropdf.pl | 4 +++-
tmac/pdf.tmac | 28 -----------------------
8 files changed, 129 insertions(+), 36 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a69f5d51f..a89a13991 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+2025-06-20 Deri James <[email protected]>
+
+ [devpdf, gropdf]: Add `SS` slanted-symbol font support. Replace
+ pseudo-slanted characters with a real font, improving typography
+ of, e.g., slanted lowercase Greek letters as used in eqn(1).
+
+ * font/devpdf/DESC.in: Mount new font `SS` prior to `S`.
+ * font/devpdf/SS: New file describes new slanted-symbol font.
+ The metrics are hand-tweaked. We can't run afmtodit on the
+ symbolsl.afm file in grops because it produces incorrect
+ metrics--the width/height values do not take into account the
+ rescaling of the glyph sizes by .89.
+ * font/devpdf/StandardSymSL.pfb: New PostScript font supplies
+ slanted versions of glyphs in the standard Symbol font.
+ * font/devpdf/devpdf.am (GROFF_FONT_FILES): Update macro
+ definition to scan the build directory for file names matching
+ font descriptions, excluding both symbol fonts. Relocate
+ definition to be closer to use.
+ (devpdffont_DATA): Add new files "SS", "StandardSymSL.pfb", and
+ "download.in".
+ (font/devpdf/SS): New target is generated by copying from source
+ tree to build tree if they differ. As a side effect, also copy
+ "StandardSymSL.pfb".
+ (font/devpdf/util/BuildFoundries): Copy "download.in" file from
+ source tree to build tree with new name "download".
+ (font/devpdf/download): Set write permission on the target to
+ work around GNU Automake "distcheck" feature that makes
+ make(1)-generated files read-only; however we want
+ "BuildFoundries" to rewrite the file in place.
+ (mostlyclean_devpdf_extra): Clean the new files "SS" and
+ "StandardSymSL.pfb", as well as "S" since the new regex used to
+ populate the `GROFF_FONT_FILES` now overlooks it.
+ (install_devpdf, uninstall_devpdf): Explicitly handle "S" font
+ description file since the new regex used to populate the
+ `GROFF_FONT_FILES` now overlooks it.
+ * src/devices/gropdf/gropdf.pl: Support multiple specifications
+ of `-F` option, populating new list `fdlist`. Use the runtime
+ path separator to populate scalar `fd` if `fdlist` is not a
+ singleton.
+ * tmac/pdf.tmac: Drop all 28 calls of `pdf:SS` macro for 24
+ lowercase Greek letters and 4 variant forms; the slanted-symbol
+ font now supplies these.
+
+ Fixes <https://savannah.gnu.org/bugs/?65098>.
+
2025-06-16 Dave Kemper <[email protected]>
* src/roff/troff/env.cpp (distribute_space): Fix expression
diff --git a/font/devpdf/DESC.in b/font/devpdf/DESC.in
index 5cb254f37..a5f5b5a71 100644
--- a/font/devpdf/DESC.in
+++ b/font/devpdf/DESC.in
@@ -6,6 +6,6 @@ unitwidth 1000
sizes 1000-10000000 0
styles R I B BI
family T
-fonts 8 0 0 0 0 0 0 S ZD
+fonts 9 0 0 0 0 0 0 SS S ZD
tcommand
postpro gropdf
diff --git a/font/devpdf/SS b/font/devpdf/SS
new file mode 100644
index 000000000..a61fa8b7a
--- /dev/null
+++ b/font/devpdf/SS
@@ -0,0 +1,50 @@
+# This file has been generated with GNU afmtodit (groff) version 1.20.1
+#
+# FullName Symbol Slanted
+# Version 001.008
+# FamilyName Symbol
+#
+# The original AFM file contains the following comments:
+#
+# Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems
Incorporated. All rights reserved.
+# Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems
Incorporated. All rights reserved.
+# Comment Creation Date: Thu May 1 15:12:25 1997
+# Comment UniqueID 43064
+# Comment VMusage 30820 39997
+
+name SS
+internalname Symbol-Slanted
+special
+slant 15.5
+spacewidth 223
+
+charset
+space 223 0 32 space
++h 562,614,16,133,-58,99 3 74 theta1
+ts 391,445,208,151,-28,99 3 86 sigma1
+*a 562,445,16,145,-34,99 3 97 alpha
+*b 489,659,198,139,58,99 3 98 beta
+*x 489,445,206,134,98,99 3 99 chi
+*d 440,658,17,181,-32,99 3 100 delta
+*e 391,447,17,127,1,99 3 101 epsilon
+*f 464,599,199,106,-28,99 3 102 phi
+*g 366,444,200,252,-42,99 3 103 gamma
+*y 537,457,180,68,-50,68 3 104 eta
+*i 293,448,15,53,-47,53 3 105 iota
++f 537,444,199,117,-42,99 3 106 phi1
+*k 489,446,0,182,-56,99 3 107 kappa
+*l 489,658,15,91,29,91 3 108 lambda
+*m 513,445,198,70,68,70 3 109 mu
+*n 464,451,14,134,-69,99 3 110 nu
+*o 489,444,17,86,-36,86 3 111 omicron
+*p 489,433,17,161,-8,99 3 112 pi
+*h 464,614,15,140,-53,99 3 113 theta
+*r 489,444,205,82,69,82 3 114 rho
+*s 537,445,19,175,-37,99 3 115 sigma
+*t 391,445,17,170,-45,99 3 116 tau
+*u 513,451,16,95,-55,95 3 117 upsilon
++p 635,519,16,173,-28,99 3 118 omega1
+*w 611,445,15,126,-35,99 3 119 omega
+*c 439,681,200,126,-20,99 3 120 xi
+*q 611,445,203,198,-91,99 3 121 psi
+*z 440,673,200,190,-50,99 3 122 zeta
diff --git a/font/devpdf/StandardSymSL.pfb b/font/devpdf/StandardSymSL.pfb
new file mode 100644
index 000000000..94efbab40
Binary files /dev/null and b/font/devpdf/StandardSymSL.pfb differ
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 3d9ae0d0d..1659944ba 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -19,8 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
devpdf_srcdir = $(top_srcdir)/font/devpdf
-GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
- && grep -ls internalname [A-CEG-Z]*`
ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
@@ -33,6 +31,9 @@ MOSTLYCLEANFILES += \
devpdffontdir = $(fontdir)/devpdf
devpdffont_DATA = \
font/devpdf/DESC \
+ font/devpdf/SS \
+ font/devpdf/download \
+ font/devpdf/StandardSymSL.pfb \
font/devpdf/Foundry
devpdffontencdir = $(devpdffontdir)/enc
@@ -48,7 +49,10 @@ devpdffontmap_DATA = $(devpdffontmapdata)
EXTRA_DIST += \
font/devpdf/DESC.in \
+ font/devpdf/SS \
+ font/devpdf/StandardSymSL.pfb \
font/devpdf/Foundry.in \
+ font/devpdf/download.in \
font/devpdf/util/BuildFoundries.pl
all: font/devpdf/stamp
@@ -58,6 +62,14 @@ font/devpdf/enc/text.enc:
$(AM_V_at)cp -f $(top_srcdir)/font/devps/text.enc \
$(top_builddir)/font/devpdf/enc
+font/devpdf/SS: font/devpdf/download
+ $(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf
+ if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
+ cp -u $(top_srcdir)/font/devpdf/SS \
+ $(top_srcdir)/font/devpdf/StandardSymSL.pfb \
+ $(top_builddir)/font/devpdf; \
+ fi
+
$(devpdffontmapdata):
$(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/map
$(AM_V_at)cp -f \
@@ -84,7 +96,12 @@ font/devpdf/util/BuildFoundries: \
$(devpdf_srcdir)/util/BuildFoundries.pl \
>$(top_builddir)/font/devpdf/util/BuildFoundries; \
fi \
- && chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries
+ && chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries \
+ && cp -f $(top_srcdir)/font/devpdf/download.in \
+ $(top_builddir)/font/devpdf/download
+
+GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
+ && grep -ls internalname [A-CEG-RT-Z]*`
MOSTLYCLEANFILES += font/devpdf/DESC
font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
@@ -119,6 +136,7 @@ font/devpdf/download: $(devpdffontmapdata) font/devpdf/DESC
\
--strict $(abs_top_builddir)/font/devpdf \
'$(abs_top_srcdir)/font/devps:$(abs_top_builddir)/font/devps' \
>>[email protected] \
+ && chmod u+w $@ \
&& mv [email protected] $@
# PDFs to be produced by troff should depend on this stamp file to
@@ -134,7 +152,12 @@ mostlyclean_devpdf_extra:
rm -rf $(top_builddir)/font/devpdf/enc \
$(top_builddir)/font/devpdf/map;
if test -d $(top_builddir)/font/devpdf; then \
- for f in $(GROFF_FONT_FILES); do \
+ for f in $(GROFF_FONT_FILES) S; do \
+ $(RM) $(top_builddir)/font/devpdf/$$f; \
+ done; \
+ fi
+ if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
+ for f in SS StandardSymSL.pfb; do \
$(RM) $(top_builddir)/font/devpdf/$$f; \
done; \
fi
@@ -144,7 +167,7 @@ install_devpdf:
@echo Installing devpdf files
-@test -d $(DESTDIR)$(devpdffontdir) \
|| $(mkinstalldirs) $(DESTDIR)$(devpdffontdir)
- @for f in $(GROFF_FONT_FILES); do \
+ @for f in $(GROFF_FONT_FILES) S; do \
$(RM) $(DESTDIR)$(devpdffontdir)/$$f; \
if test -f $$f; then \
$(INSTALL_DATA) $$f $(DESTDIR)$(devpdffontdir)/$$f; \
@@ -160,7 +183,7 @@ uninstall_groffdirs: uninstall_devpdf
uninstall_devpdf:
@echo Uninstalling devpdf files
if test -d $(DESTDIR)$(devpdffontdir); then \
- for f in $(GROFF_FONT_FILES); do \
+ for f in $(GROFF_FONT_FILES) S; do \
$(RM) $(DESTDIR)$(devpdffontdir)/$$f; \
done; \
if test -d $(DESTDIR)$(devpdffontencdir); then \
diff --git a/font/devpdf/download.in b/font/devpdf/download.in
new file mode 100644
index 000000000..6eea741ee
--- /dev/null
+++ b/font/devpdf/download.in
@@ -0,0 +1 @@
+ Symbol-Slanted StandardSymSL.pfb
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 409f15284..115bc3bd9 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -463,6 +463,7 @@ sub usage
}
my $fd;
+my @fdlist;
my $frot;
my $fpsz;
my $embedall=0;
@@ -489,7 +490,7 @@ my $thisfnt;
my $parcln=qr/\[[^\]]*?\]|(.)((?!\1).)*\1/;
my $parclntyp=qr/(?:[\d\w]|\([+-]?[\S]{2}|$parcln)/;
-if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' => \$frot,
+if (!GetOptions('F=s' => \@fdlist, 'I=s' => \@idirs, 'l' => \$frot,
'p=s' => \$fpsz, 'd!' => \$debug, 'help' => \$want_help, 'pdfver=f' =>
\$PDFver,
'v' => \$version, 'version' => \$version, 'opt=s' => \$options,
'e' => \$embedall, 'y=s' => \$Foundry, 's' => \$stats,
@@ -499,6 +500,7 @@ if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' =>
\$frot,
}
unshift(@idirs,'.');
+$fd=join('@RT_SEP@',@fdlist) if $#fdlist > -1;
&usage(0) if ($want_help);
diff --git a/tmac/pdf.tmac b/tmac/pdf.tmac
index 98fa3ef0e..9571e0148 100644
--- a/tmac/pdf.tmac
+++ b/tmac/pdf.tmac
@@ -38,34 +38,6 @@ am solely responsible for any bugs I may have introduced
into this file.
.de pdf:SS
. fchar \\$1 \\S'16'\\$1\\S'0'
..
-.pdf:SS \[+h]
-.pdf:SS \[ts]
-.pdf:SS \[*a]
-.pdf:SS \[*b]
-.pdf:SS \[*x]
-.pdf:SS \[*d]
-.pdf:SS \[*e]
-.pdf:SS \[*f]
-.pdf:SS \[*g]
-.pdf:SS \[*y]
-.pdf:SS \[*i]
-.pdf:SS \[+f]
-.pdf:SS \[*k]
-.pdf:SS \[*l]
-.pdf:SS \[*m]
-.pdf:SS \[*n]
-.pdf:SS \[*o]
-.pdf:SS \[*p]
-.pdf:SS \[*h]
-.pdf:SS \[*r]
-.pdf:SS \[*s]
-.pdf:SS \[*t]
-.pdf:SS \[*u]
-.pdf:SS \[+p]
-.pdf:SS \[*w]
-.pdf:SS \[*c]
-.pdf:SS \[*q]
-.pdf:SS \[*z]
.char \[lh] \X'pdf: xrev'\[rh]\X'pdf: xrev'
.nr pdf:bm.nl 1
.nr pdf:bm.nk 0
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit