gbranden pushed a commit to branch master
in repository groff.
commit 6e45bb0bc682e20549ed2d9160cafaeaafbb8c24
Author: Deri James <[email protected]>
AuthorDate: Thu Jan 4 05:29:19 2024 +0000
[gropdf]: Fix Savannah #65112 (subsetting).
* src/devices/gropdf/gropdf.pl (subs_call): Type 1 fonts have a section
of numbered subroutines which can be called from the actual glyph
definition; I have seen over 1000 in some large fonts. So, when you
are subsetting you need to subset (and renumber) any relevant
subroutines used by the glyph you are subsetting.
Fixes <https://savannah.gnu.org/bugs/?65112>.
---
ChangeLog | 13 +++++++++++++
src/devices/gropdf/gropdf.pl | 6 +++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 18dae35c3..8827de0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-01-04 Deri James <[email protected]>
+
+ [gropdf]: Fix Savannah #65112.
+
+ * src/devices/gropdf/gropdf.pl (subs_call): Type 1 fonts have a
+ section of numbered subroutines which can be called from the
+ actual glyph definition; I have seen over 1000 in some large
+ fonts. So, when you are subsetting you need to subset (and
+ renumber) any relevant subroutines used by the glyph you are
+ subsetting.
+
+ Fixes <https://savannah.gnu.org/bugs/?65112>.
+
2024-01-04 G. Branden Robinson <[email protected]>
* src/utils/grog/grog.pl: Trivially refactor; simplify code.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 4a9e0e3b0..3f70a4263 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -4732,7 +4732,11 @@ sub subs_call
my $n2=$charstr->[++$j];
push(@c,[$n2,0]);
- if ($n2==6) # seac
+ if ($n2==16) # callothersub
+ {
+ $c[$#c-4]->[0]=MarkSub("#$c[$#c-4]->[0]") if ($c[$#c-4]->[1]);
+ }
+ elsif ($n2==16) # seac
{
my $ch=$StdEnc{$c[$#c-2]->[0]};
my $chf;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit