diff options
author | nork <nork@FreeBSD.org> | 2003-07-27 07:26:51 +0800 |
---|---|---|
committer | nork <nork@FreeBSD.org> | 2003-07-27 07:26:51 +0800 |
commit | ca182fbb16aad179170dc713a89c2c52cdea08cf (patch) | |
tree | 8a75684661ab46cbbd178aab3341dec9cc66512d | |
parent | 0d9ba6b6c6242355be77ca34356343c46c5173f6 (diff) | |
download | freebsd-ports-gnome-ca182fbb16aad179170dc713a89c2c52cdea08cf.tar.gz freebsd-ports-gnome-ca182fbb16aad179170dc713a89c2c52cdea08cf.tar.zst freebsd-ports-gnome-ca182fbb16aad179170dc713a89c2c52cdea08cf.zip |
Fix handling big post table and GSUB's Lookuplist
sub table. These problems cause that ghostscript
can't display with kochi-subst fonts.
PR: ports-jp/13949, ports-jp/13973
Reported by: Yoshihiko Sarumaru <mistral@imasy.or.jp>
Submitted by: KANOU Hiroki <kanou@khdd.net>
Patched by: Akira TAGOH <at at gclab.org>
-rw-r--r-- | print/ghostscript-gnu/Makefile | 2 | ||||
-rw-r--r-- | print/ghostscript-gnu/files/patch-lib:gs_ttf.ps | 117 | ||||
-rw-r--r-- | print/ghostscript7/Makefile | 2 | ||||
-rw-r--r-- | print/ghostscript7/files/patch-lib:gs_ttf.ps | 117 |
4 files changed, 236 insertions, 2 deletions
diff --git a/print/ghostscript-gnu/Makefile b/print/ghostscript-gnu/Makefile index 5a981027b560..dbe46b244b3a 100644 --- a/print/ghostscript-gnu/Makefile +++ b/print/ghostscript-gnu/Makefile @@ -7,7 +7,7 @@ PORTNAME= ghostscript PORTVERSION= ${GS_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_GNU:S/$/:gs_fonts/} \ ${MASTER_SITE_SOURCEFORGE:S/$/:gs_srcs,gprint,bjc250/} \ diff --git a/print/ghostscript-gnu/files/patch-lib:gs_ttf.ps b/print/ghostscript-gnu/files/patch-lib:gs_ttf.ps new file mode 100644 index 000000000000..70f8e1fda27f --- /dev/null +++ b/print/ghostscript-gnu/files/patch-lib:gs_ttf.ps @@ -0,0 +1,117 @@ +--- lib/gs_ttf.ps.orig Sat Apr 12 23:02:38 2003 ++++ lib/gs_ttf.ps Fri Jul 25 13:25:33 2003 +@@ -575,7 +575,7 @@ + (maxp) 1 index + (name) 1 index + (OS/2) 1 index +- (post) 1 index ++ (post) { .readbigtable } + (vhea) 1 index + % Big tables + (glyf) { .readbigtable } +@@ -918,10 +918,17 @@ + DEBUG { (fontname ) print fontname = } if + % Stack: ... /FontInfo mark key1 value1 ... + post null ne { +- /ItalicAngle post 4 gets32 65536.0 div +- /isFixedPitch post 12 getu32 0 ne +- /UnderlinePosition post 8 gets16 upem div +- /UnderlineThickness post 10 gets16 upem div ++ post type /arraytype eq { ++ % this post table is a big table. /post should be [(...) ...] ++ % data we actually need here should be first one in array. ++ /posttable post 1 get def ++ } { ++ /posttable post def ++ } ifelse ++ /ItalicAngle posttable 4 gets32 65536.0 div ++ /isFixedPitch posttable 12 getu32 0 ne ++ /UnderlinePosition posttable 8 gets16 upem div ++ /UnderlineThickness posttable 10 gets16 upem div + } if + counttomark 0 ne { .dicttomark } { pop pop } ifelse + /XUID [orgXUID 42 curxuid] +@@ -1119,41 +1126,52 @@ + %(gsubofl: ) print gsubofl = + (gsuboll: ) print gsuboll = + } if +- dup /gsubfmt exch gsuboll 0 add getu16 def ++ % /gsuboll should be pointed out the LookupList table, but not Lookup table. ++ % so this is wrong: dup /gsubfmt exch gsuboll 0 add getu16 def ++ dup /gsublc exch gsuboll 0 add getu16 def + DEBUG { +- (gsubfmt: ) print gsubfmt = ++ (gsublc: ) print gsublc = + } if +-% gsubver 16#00010000 eq { % ifelse +- gsubfmt 2 eq { % ifelse +- dup /gsubocv exch gsuboll 2 add getu16 def +- dup /gsubglc exch gsuboll 4 add getu16 def +- % hacked by suzuki toshiya at 2001/3/6 +- %dup /gsubvog exch gsuboll 6 add gsubglc getinterval def +- %dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc getinterval def +- dup /gsubvog exch gsuboll 6 add gsubglc 2 mul getinterval def +- dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc 2 mul getinterval def ++ gsublc 0 ne { ++ 0 1 gsublc 1 sub { ++ 2 mul /gsubolt exch 2 index exch gsuboll 2 add add getu16 gsuboll add def ++ dup /gsubfmt exch gsubolt 0 add getu16 def + DEBUG { +- (gsubocv: ) print gsubocv = +- (gsubglc: ) print gsubglc = +- +- (gsubhog->gsubvog ) = +- 0 2 gsubhog length 2 sub { % for +- dup +- gsubhog exch getu16 =only +- (->) =only +- gsubvog exch getu16 = +- } for ++ (gsubfmt: ) print gsubfmt = + } if +- /gsubh2v << 0 2 gsubhog length 2 sub { +- dup gsubhog exch getu16 +- exch gsubvog exch getu16 +- } for >> def +- } { +- %(UNKNOWN GSUB FORMAT.) = flush +- } ifelse +-% } { +-% (ILLEGAL GSUB VERSION.) = flush +-% } ifelse ++% gsubver 16#00010000 eq { % ifelse ++ gsubfmt 2 eq { % ifelse ++ dup /gsubocv exch gsubolt 2 add getu16 def ++ dup /gsubglc exch gsubolt 4 add getu16 def ++ % hacked by suzuki toshiya at 2001/3/6 ++ %dup /gsubvog exch gsubolt 6 add gsubglc getinterval def ++ %dup /gsubhog exch gsubolt gsubocv add 4 add gsubglc getinterval def ++ dup /gsubvog exch gsubolt 6 add gsubglc 2 mul getinterval def ++ dup /gsubhog exch gsubolt gsubocv add 4 add gsubglc 2 mul getinterval def ++ DEBUG { ++ (gsubocv: ) print gsubocv = ++ (gsubglc: ) print gsubglc = ++ ++ (gsubhog->gsubvog ) = ++ 0 2 gsubhog length 2 sub { % for ++ dup ++ gsubhog exch getu16 =only ++ (->) =only ++ gsubvog exch getu16 = ++ } for ++ } if ++ /gsubh2v << 0 2 gsubhog length 2 sub { ++ dup gsubhog exch getu16 ++ exch gsubvog exch getu16 ++ } for >> def ++ } { ++ %(UNKNOWN GSUB FORMAT.) = flush ++ } ifelse ++% } { ++% (ILLEGAL GSUB VERSION.) = flush ++% } ifelse ++ } for ++ } if + pop + } if + } bind def diff --git a/print/ghostscript7/Makefile b/print/ghostscript7/Makefile index 5a981027b560..dbe46b244b3a 100644 --- a/print/ghostscript7/Makefile +++ b/print/ghostscript7/Makefile @@ -7,7 +7,7 @@ PORTNAME= ghostscript PORTVERSION= ${GS_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_GNU:S/$/:gs_fonts/} \ ${MASTER_SITE_SOURCEFORGE:S/$/:gs_srcs,gprint,bjc250/} \ diff --git a/print/ghostscript7/files/patch-lib:gs_ttf.ps b/print/ghostscript7/files/patch-lib:gs_ttf.ps new file mode 100644 index 000000000000..70f8e1fda27f --- /dev/null +++ b/print/ghostscript7/files/patch-lib:gs_ttf.ps @@ -0,0 +1,117 @@ +--- lib/gs_ttf.ps.orig Sat Apr 12 23:02:38 2003 ++++ lib/gs_ttf.ps Fri Jul 25 13:25:33 2003 +@@ -575,7 +575,7 @@ + (maxp) 1 index + (name) 1 index + (OS/2) 1 index +- (post) 1 index ++ (post) { .readbigtable } + (vhea) 1 index + % Big tables + (glyf) { .readbigtable } +@@ -918,10 +918,17 @@ + DEBUG { (fontname ) print fontname = } if + % Stack: ... /FontInfo mark key1 value1 ... + post null ne { +- /ItalicAngle post 4 gets32 65536.0 div +- /isFixedPitch post 12 getu32 0 ne +- /UnderlinePosition post 8 gets16 upem div +- /UnderlineThickness post 10 gets16 upem div ++ post type /arraytype eq { ++ % this post table is a big table. /post should be [(...) ...] ++ % data we actually need here should be first one in array. ++ /posttable post 1 get def ++ } { ++ /posttable post def ++ } ifelse ++ /ItalicAngle posttable 4 gets32 65536.0 div ++ /isFixedPitch posttable 12 getu32 0 ne ++ /UnderlinePosition posttable 8 gets16 upem div ++ /UnderlineThickness posttable 10 gets16 upem div + } if + counttomark 0 ne { .dicttomark } { pop pop } ifelse + /XUID [orgXUID 42 curxuid] +@@ -1119,41 +1126,52 @@ + %(gsubofl: ) print gsubofl = + (gsuboll: ) print gsuboll = + } if +- dup /gsubfmt exch gsuboll 0 add getu16 def ++ % /gsuboll should be pointed out the LookupList table, but not Lookup table. ++ % so this is wrong: dup /gsubfmt exch gsuboll 0 add getu16 def ++ dup /gsublc exch gsuboll 0 add getu16 def + DEBUG { +- (gsubfmt: ) print gsubfmt = ++ (gsublc: ) print gsublc = + } if +-% gsubver 16#00010000 eq { % ifelse +- gsubfmt 2 eq { % ifelse +- dup /gsubocv exch gsuboll 2 add getu16 def +- dup /gsubglc exch gsuboll 4 add getu16 def +- % hacked by suzuki toshiya at 2001/3/6 +- %dup /gsubvog exch gsuboll 6 add gsubglc getinterval def +- %dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc getinterval def +- dup /gsubvog exch gsuboll 6 add gsubglc 2 mul getinterval def +- dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc 2 mul getinterval def ++ gsublc 0 ne { ++ 0 1 gsublc 1 sub { ++ 2 mul /gsubolt exch 2 index exch gsuboll 2 add add getu16 gsuboll add def ++ dup /gsubfmt exch gsubolt 0 add getu16 def + DEBUG { +- (gsubocv: ) print gsubocv = +- (gsubglc: ) print gsubglc = +- +- (gsubhog->gsubvog ) = +- 0 2 gsubhog length 2 sub { % for +- dup +- gsubhog exch getu16 =only +- (->) =only +- gsubvog exch getu16 = +- } for ++ (gsubfmt: ) print gsubfmt = + } if +- /gsubh2v << 0 2 gsubhog length 2 sub { +- dup gsubhog exch getu16 +- exch gsubvog exch getu16 +- } for >> def +- } { +- %(UNKNOWN GSUB FORMAT.) = flush +- } ifelse +-% } { +-% (ILLEGAL GSUB VERSION.) = flush +-% } ifelse ++% gsubver 16#00010000 eq { % ifelse ++ gsubfmt 2 eq { % ifelse ++ dup /gsubocv exch gsubolt 2 add getu16 def ++ dup /gsubglc exch gsubolt 4 add getu16 def ++ % hacked by suzuki toshiya at 2001/3/6 ++ %dup /gsubvog exch gsubolt 6 add gsubglc getinterval def ++ %dup /gsubhog exch gsubolt gsubocv add 4 add gsubglc getinterval def ++ dup /gsubvog exch gsubolt 6 add gsubglc 2 mul getinterval def ++ dup /gsubhog exch gsubolt gsubocv add 4 add gsubglc 2 mul getinterval def ++ DEBUG { ++ (gsubocv: ) print gsubocv = ++ (gsubglc: ) print gsubglc = ++ ++ (gsubhog->gsubvog ) = ++ 0 2 gsubhog length 2 sub { % for ++ dup ++ gsubhog exch getu16 =only ++ (->) =only ++ gsubvog exch getu16 = ++ } for ++ } if ++ /gsubh2v << 0 2 gsubhog length 2 sub { ++ dup gsubhog exch getu16 ++ exch gsubvog exch getu16 ++ } for >> def ++ } { ++ %(UNKNOWN GSUB FORMAT.) = flush ++ } ifelse ++% } { ++% (ILLEGAL GSUB VERSION.) = flush ++% } ifelse ++ } for ++ } if + pop + } if + } bind def |