diff options
author | Deri James <deri@chuzzlewit.myzen.co.uk> | 2024-01-04 05:29:19 +0000 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2024-01-04 12:26:00 -0600 |
commit | 6e45bb0bc682e20549ed2d9160cafaeaafbb8c24 (patch) | |
tree | 7cbf39d56fd819b2388af81d22511ffe1a3ab84b | |
parent | c270e7b00286ba8710dc461a4a3e1c56e5a922a3 (diff) |
[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>.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/devices/gropdf/gropdf.pl | 6 |
2 files changed, 18 insertions, 1 deletions
@@ -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; |