[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/18: [gropdf]: Fix Savannah #65112 (subsetting).
From: |
G. Branden Robinson |
Subject: |
[groff] 11/18: [gropdf]: Fix Savannah #65112 (subsetting). |
Date: |
Fri, 5 Jan 2024 22:25:19 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 6e45bb0bc682e20549ed2d9160cafaeaafbb8c24
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
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 <deri@chuzzlewit.myzen.co.uk>
+
+ [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 <g.branden.robinson@gmail.com>
* 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/18: [gropdf]: Fix Savannah #65112 (subsetting).,
G. Branden Robinson <=