Created
October 17, 2015 15:54
-
-
Save aminophen/9dbf25472b3fe6dc8911 to your computer and use it in GitHub Desktop.
GNU Ghostscript 7.07 (win32) を make するために作成したパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urxN ghostscript-7.07.orig/examples/cjk/all_ac1.ps ghostscript-7.07/examples/cjk/all_ac1.ps | |
--- ghostscript-7.07.orig/examples/cjk/all_ac1.ps Tue Apr 02 23:53:39 2002 | |
+++ ghostscript-7.07/examples/cjk/all_ac1.ps Tue Sep 29 01:34:56 2015 | |
@@ -182,7 +182,8 @@ | |
%[0 17407] % Adobe-CNS1-0,1 | |
%[0 17600] % Adobe-CNS1-0,1,2 | |
%[0 18845] % Adobe-CNS1-0,1,2,3 | |
- [0 18961] % Adobe-CNS1-0,1,2,3,4 | |
+ %[0 18961] % Adobe-CNS1-0,1,2,3,4 | |
+ [0 18964] % Adobe-CNS1-0,1,2,3,4 | |
] { | |
cvx exec 1 exch { | |
/id exch def | |
diff -urxN ghostscript-7.07.orig/examples/cjk/all_aj1.ps ghostscript-7.07/examples/cjk/all_aj1.ps | |
--- ghostscript-7.07.orig/examples/cjk/all_aj1.ps Tue Apr 02 23:53:39 2002 | |
+++ ghostscript-7.07/examples/cjk/all_aj1.ps Tue Sep 29 01:35:01 2015 | |
@@ -180,6 +180,8 @@ | |
[8359 8719] % Adobe-Japan1-2 | |
[8720 9353] % Adobe-Japan1-3 | |
[9354 15443] % Adobe-Japan1-4 | |
+ [15444 20316] % Adobe-Japan1-5 | |
+ [20317 23057] % Adobe-Japan1-6 | |
] { | |
cvx exec 1 exch { | |
/id exch def | |
diff -urxN ghostscript-7.07.orig/lib/CIDFnmap ghostscript-7.07/lib/CIDFnmap | |
--- ghostscript-7.07.orig/lib/CIDFnmap Tue Apr 02 23:47:42 2002 | |
+++ ghostscript-7.07/lib/CIDFnmap Sat Oct 17 23:12:12 2015 | |
@@ -153,5 +153,44 @@ | |
% native CIDFontName (Shift_JIS) in Japanese | |
%(CIDFnmap.sj) .runlibfile | |
+%%%%% Sample CIDFnmap by Hironobu YAMASHITA (@aminophen) %%%%% | |
+% IPA fonts | |
+/IPAMincho (ipam.ttf) ; | |
+/IPAGothic (ipag.ttf) ; | |
+/IPAexMincho (ipaexm.ttf) ; | |
+/IPAexGothic (ipaexg.ttf) ; | |
+% Hiragino fonts (can be purchased from Dainippon Screen) | |
+/HiraMinProN-W3 (HiraMinProN-W3.otf) ; | |
+/HiraMinProN-W6 (HiraMinProN-W6.otf) ; | |
+/HiraKakuProN-W3 (HiraKakuProN-W3.otf) ; | |
+/HiraKakuProN-W6 (HiraKakuProN-W6.otf) ; | |
+/HiraKakuStdN-W8 (HiraKakuStdN-W8.otf) ; | |
+/HiraMaruProN-W4 (HiraMaruProN-W4.otf) ; | |
+% Kozuka fonts (can be use only when you have Adobe softwares) | |
+/KozMinPr6N-ExtraLight (KozMinPr6N-ExtraLight.otf) ; | |
+/KozMinPr6N-Light (KozMinPr6N-Light.otf) ; | |
+/KozMinPr6N-Regular (KozMinPr6N-Regular.otf) ; | |
+/KozMinPr6N-Medium (KozMinPr6N-Medium.otf) ; | |
+/KozMinPr6N-Bold (KozMinPr6N-Bold.otf) ; | |
+/KozMinPr6N-Heavy (KozMinPr6N-Heavy.otf) ; | |
+/KozGoPr6N-ExtraLight (KozGoPr6N-ExtraLight.otf) ; | |
+/KozGoPr6N-Light (KozGoPr6N-Light.otf) ; | |
+/KozGoPr6N-Regular (KozGoPr6N-Regular.otf) ; | |
+/KozGoPr6N-Medium (KozGoPr6N-Medium.otf) ; | |
+/KozGoPr6N-Bold (KozGoPr6N-Bold.otf) ; | |
+/KozGoPr6N-Heavy (KozGoPr6N-Heavy.otf) ; | |
+% Aliases | |
+/HeiseiMin-W3 /Ryumin-Light ; | |
+/HeiseiKakuGo-W5 /GothicBBB-Medium ; | |
+/Ryumin-Light /IPAMincho ; | |
+/GothicBBB-Medium /IPAGothic ; | |
+%/Ryumin-Light /HiraMinProN-W3 ; | |
+%/GothicBBB-Medium /HiraKakuProN-W6 ; | |
+%/Ryumin-Light /KozMinPr6N-Regular ; | |
+%/GothicBBB-Medium /KozGoPr6N-Medium ; | |
+%/Ryumin-Light (msmincho.ttc) 1 ; % this fails, why? | |
+%/GothicBBB-Medium (msgothic.ttc) 1 ; % this fails, why? | |
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
+ | |
% native CIDFontName (euc-kr) in Korean | |
%(CIDFnmap.ksx) .runlibfile | |
diff -urxN ghostscript-7.07.orig/lib/bdftops ghostscript-7.07/lib/bdftops | |
--- ghostscript-7.07.orig/lib/bdftops Wed Mar 28 06:15:55 2001 | |
+++ ghostscript-7.07/lib/bdftops Mon May 19 21:21:04 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: bdftops,v 1.2 2001/03/27 21:15:55 alexcher Exp $ | |
-exec gs -q -dBATCH -dNODISPLAY -- bdftops.ps "$@" | |
+gswin32c -q -dBATCH -dNODISPLAY -- bdftops.ps "$@" | |
diff -urxN ghostscript-7.07.orig/lib/dvipdf ghostscript-7.07/lib/dvipdf | |
--- ghostscript-7.07.orig/lib/dvipdf Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/dvipdf Tue Sep 29 02:16:24 2015 | |
@@ -37,4 +37,4 @@ | |
# We have to include the options twice because -I only takes effect if it | |
# appears before other options. | |
-exec dvips -q -f "$infile" | gs $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite - | |
+dvips -Ppdf -q -f "$infile" | gswin32c $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite - | |
diff -urxN ghostscript-7.07.orig/lib/eps2eps ghostscript-7.07/lib/eps2eps | |
--- ghostscript-7.07.orig/lib/eps2eps Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/eps2eps Mon May 19 21:23:02 2003 | |
@@ -17,4 +17,4 @@ | |
exit 1 | |
fi | |
-exec gs -q -sDEVICE=epswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH -dSAFER $OPTIONS "$1" | |
+gswin32c -q -sDEVICE=epswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH -dSAFER $OPTIONS "$1" | |
diff -urxN ghostscript-7.07.orig/lib/font2c ghostscript-7.07/lib/font2c | |
--- ghostscript-7.07.orig/lib/font2c Thu Mar 09 17:40:39 2000 | |
+++ ghostscript-7.07/lib/font2c Mon May 19 21:23:22 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: font2c,v 1.1 2000/03/09 08:40:39 lpd Exp $ | |
-exec gs -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps "$@" | |
+gswin32c -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gs_cff.ps ghostscript-7.07/lib/gs_cff.ps | |
--- ghostscript-7.07.orig/lib/gs_cff.ps Sat Apr 12 23:02:38 2003 | |
+++ ghostscript-7.07/lib/gs_cff.ps Tue Sep 29 01:35:00 2015 | |
@@ -57,7 +57,8 @@ | |
dup 0 eq { | |
pop pop /.loadottofontfile cvx /invalidfont signalerror | |
} if | |
- f 4 string readstring pop (CFF ) eq { sub exit } if | |
+ f 4 string readstring pop (CFF ) eq { sub exit } | |
+ { f 16 4 sub string readstring pop pop } ifelse | |
1 sub | |
} loop | |
% Stack: tablesread | |
@@ -492,12 +493,21 @@ | |
{ [ exch charstringcount pop { card8 } repeat ] } bind | |
{ /FDSelect cvx /invalidfont signalerror } bind | |
dup | |
-{ pop [ card16 card16 exch { | |
- % Stack: previndex | |
- card8 card16 dup 4 1 roll 3 -1 roll sub 1 sub { | |
- exch 1 index | |
- } repeat exch | |
- } repeat pop ] | |
+% Fixed operand stack overflow by Taiji Yamada <taiji@aihara.co.jp> | |
+{ | |
+ pop 0 16384 array card16 card16 exch { % i arr C2 C1 {} repeat | |
+ card8 card16 exch % i arr C2 C3 c1 | |
+ 1 index 4 -1 roll sub % i arr C3 c1 C3-C2-1(=c) | |
+ 4 index 1 index add 4 index length ge { % i arr C3 c1 c i+c>=l | |
+ 4 index 1 index add array % i arr C3 c1 c arr | |
+ dup 0 6 index putinterval % i arr C3 c1 c arr | |
+ 5 -1 roll pop 4 1 roll % i arr C3 c1 c | |
+ } if % i arr C3 c1 c | |
+ { % i arr C3 c1 c {} repeat | |
+ 2 index 4 index 2 index put % i arr C3 c1 (arr i c1 put) | |
+ 4 -1 roll 1 add 4 1 roll % i++ arr C3 c1 | |
+ } repeat pop % i arr C3 | |
+ } repeat pop exch pop % arr | |
} bind | |
] readonly def | |
diff -urxN ghostscript-7.07.orig/lib/gs_cidfn.ps ghostscript-7.07/lib/gs_cidfn.ps | |
--- ghostscript-7.07.orig/lib/gs_cidfn.ps Sat Apr 12 23:02:38 2003 | |
+++ ghostscript-7.07/lib/gs_cidfn.ps Tue Sep 29 01:34:52 2015 | |
@@ -511,9 +511,32 @@ | |
.loadinitialcidfonts | |
+% <fontname> <font> .RenameFontForNeverEmbed <fontname> <font'> | |
+/.RenameFontForNeverEmbed { | |
+ /DEVICE where { pop DEVICE (pdfwrite) eq { | |
+ currentdistillerparams /NeverEmbed get { | |
+ 2 index eq { | |
+ (*** unembeddable CIDFont: ) print 1 index == flush | |
+ dup length 1 add dict copy | |
+ dup /FID undef | |
+ dup /.orig_CIDFontName 1 index /CIDFontName get put | |
+ dup /CIDFontName 3 index dup type /stringtype eq { | |
+ dup rcheck { | |
+ dup length string 0 1 2 index length 1 sub { | |
+ 2 index 1 index get 3 copy put pop pop | |
+ } for exch pop | |
+ } if | |
+ } if put | |
+ dup /FontName 1 index /CIDFontName get put | |
+ } if | |
+ } forall | |
+ } if } if | |
+} bind def | |
+ | |
/CIDFontmapHandler << | |
/nametype { | |
/CIDFont findresource | |
+ .RenameFontForNeverEmbed | |
/CIDFont defineresource pop | |
} bind | |
/stringtype { | |
@@ -528,6 +551,7 @@ | |
pop pop | |
} { | |
% Give a name different from the name defined in the file | |
+ .RenameFontForNeverEmbed | |
/CIDFont defineresource pop | |
} ifelse | |
} { | |
@@ -546,6 +570,7 @@ | |
3 -1 roll put | |
% Expand array | |
aload pop .loadcjkvttcidfont | |
+ .RenameFontForNeverEmbed | |
/CIDFont defineresource pop | |
} { | |
/undefinedresource signalerror | |
diff -urxN ghostscript-7.07.orig/lib/gs_res.ps ghostscript-7.07/lib/gs_res.ps | |
--- ghostscript-7.07.orig/lib/gs_res.ps Sat Apr 12 23:02:38 2003 | |
+++ ghostscript-7.07/lib/gs_res.ps Fri Sep 05 20:54:40 2003 | |
@@ -246,8 +246,8 @@ | |
/pssystemparams 10 dict readonly def | |
} if | |
pssystemparams begin | |
- /FontResourceDir (/Resource/Font/) readonly .forcedef % pssys'params is r-o | |
- /GenericResourceDir (/Resource/) readonly .forcedef % pssys'params is r-o | |
+ /FontResourceDir (c:/gs/gs7.07/Resource/Font/) readonly .forcedef % pssys'params is r-o | |
+ /GenericResourceDir (c:/gs/gs7.07/Resource/) readonly .forcedef % pssys'params is r-o | |
/GenericResourcePathSep (/) readonly .forcedef % pssys'params is r-o | |
end | |
end | |
diff -urxN ghostscript-7.07.orig/lib/gs_ttf.ps ghostscript-7.07/lib/gs_ttf.ps | |
--- ghostscript-7.07.orig/lib/gs_ttf.ps Sat Apr 12 23:02:38 2003 | |
+++ ghostscript-7.07/lib/gs_ttf.ps Tue Sep 29 01:35:01 2015 | |
@@ -274,6 +274,54 @@ | |
2 index length 2 index gt { put } { pop pop pop } ifelse | |
} bind def | |
+/.biglength { % <str>|<array of str> .biglength <integer> | |
+ dup type /arraytype eq { 0 exch { length add } forall } { length } ifelse | |
+} bind def | |
+ | |
+/concats { % [str ...] concats str | |
+ () exch dup length 1 sub -1 0 { | |
+ 1 index exch get dup type /stringtype ne { dup length string cvs } if | |
+ 3 -1 roll exch dup length 2 index length add string | |
+ dup dup 4 2 roll copy length 4 -1 roll putinterval exch | |
+ } for pop | |
+} bind def | |
+ | |
+% <str>|<array of str> <index> <count> .biggetinterval <str>|<array of str> | |
+/.biggetinterval { | |
+ 3 dict begin | |
+ 2 index type /arraytype eq { | |
+ /c exch def | |
+ /i exch def | |
+ [ exch { | |
+ dup length /l exch def | |
+ i c add l gt { | |
+ i l lt { | |
+ i l i sub getinterval | |
+ /c i c add l sub def | |
+ /i 0 def | |
+ } { | |
+ pop | |
+ /i i l sub def | |
+ } ifelse | |
+ } { | |
+ i c getinterval exit | |
+ } ifelse | |
+ } forall | |
+ ] dup .biglength 65535 le { concats } if | |
+ } { getinterval } ifelse | |
+ end | |
+} bind def | |
+ | |
+% <str>|<array of str> <index> getu16 <integer> | |
+/.biggetu16 { | |
+ 2 .biggetinterval 0 getu16 | |
+} bind def | |
+ | |
+% <str>|<array of str> <index> getu32 <integer> | |
+/.biggetu32 { | |
+ 4 .biggetinterval 0 getu32 | |
+} bind def | |
+ | |
% Each procedure in this dictionary is called as follows: | |
% <encodingtable> proc <glypharray> | |
/cmapformats mark | |
@@ -432,14 +480,14 @@ | |
} bind | |
4 { % Microsoft/Adobe segmented mapping. | |
/etab exch def | |
- /nseg2 etab 6 getu16 def | |
- 14 /endc etab 2 index nseg2 getinterval def | |
+ /nseg2 etab 6 .biggetu16 def | |
+ 14 /endc etab 2 index nseg2 .biggetinterval def | |
% The Apple TrueType documentation omits the 2-byte | |
% 'reserved pad' that follows the endCount vector! | |
2 add | |
- nseg2 add /startc etab 2 index nseg2 getinterval def | |
- nseg2 add /iddelta etab 2 index nseg2 getinterval def | |
- nseg2 add /idroff etab 2 index nseg2 getinterval def | |
+ nseg2 add /startc etab 2 index nseg2 .biggetinterval def | |
+ nseg2 add /iddelta etab 2 index nseg2 .biggetinterval def | |
+ nseg2 add /idroff etab 2 index nseg2 .biggetinterval def | |
% The following hack allows us to properly handle | |
% idiosyncratic fonts that start at 0xf000: | |
pop | |
@@ -465,8 +513,8 @@ | |
/numcodes 0 def /code 0 def | |
0 2 nseg2 3 sub { | |
/i2 exch def | |
- /scode startc i2 getu16 def | |
- /ecode endc i2 getu16 def | |
+ /scode startc i2 .biggetu16 def | |
+ /ecode endc i2 .biggetu16 def | |
numcodes scode firstcode sub | |
% Hack for fonts that have only 0x0000 and 0xf000 ranges | |
%dup 16#e000 ge { 255 and } if | |
@@ -478,15 +526,15 @@ | |
(scode=) print scode =only | |
( ecode=) print ecode =only | |
( delta=) print delta =only | |
- ( droff=) print idroff i2 getu16 = | |
+ ( droff=) print idroff i2 .biggetu16 = | |
} if | |
- idroff i2 getu16 dup 0 eq { | |
+ idroff i2 .biggetu16 dup 0 eq { | |
pop scode delta add 65535 and 1 ecode delta add 65535 and | |
{ putglyph } for | |
} { % The +2 is for the 'reserved pad'. | |
/gloff exch 14 nseg2 3 mul add 2 add i2 add add def | |
0 1 ecode scode sub { | |
- 2 mul gloff add etab exch getu16 | |
+ 2 mul gloff add etab exch .biggetu16 | |
dup 0 ne { delta add 65535 and } if putglyph | |
} for | |
} ifelse | |
@@ -509,14 +557,14 @@ | |
% <cmaptab> cmaparray <glypharray> | |
/cmaparray { | |
- dup 0 getu16 | |
+ dup 0 .biggetu16 | |
cmapformats exch .knownget { | |
DEBUG { | |
- (cmap: format ) print 1 index 0 getu16 = flush | |
+ (cmap: format ) print 1 index 0 .biggetu16 = flush | |
} if exec | |
} { | |
- (Can't handle format ) print 0 getu16 = flush | |
+ (Can't handle format ) print 0 .biggetu16 = flush | |
0 1 255 { } for 256 packedarray | |
} ifelse | |
DEBUG { | |
@@ -569,24 +617,24 @@ | |
% Adobe requirement that each sfnts entry have even length. | |
/readtables mark | |
% Ordinary tables | |
- (cmap) { .readtable } | |
- (head) 1 index | |
- (hhea) 1 index | |
- (maxp) 1 index | |
- (name) 1 index | |
- (OS/2) 1 index | |
- (post) 1 index | |
- (vhea) 1 index | |
+ (cmap) { .readbigtable } | |
+ (head) { .readtable } | |
+ (hhea) { .readtable } | |
+ (maxp) { .readtable } | |
+ (name) { .readtable } | |
+ (OS/2) { .readtable } | |
+ (post) { .readbigtable } | |
+ (vhea) { .readbigtable } | |
% Big tables | |
(glyf) { .readbigtable } | |
- (loca) 1 index | |
- (hmtx) 1 index | |
- (vmtx) 1 index | |
+ (loca) { .readbigtable } | |
+ (hmtx) { .readbigtable } | |
+ (vmtx) { .readbigtable } | |
% Tables only needed for embedding in PDF files | |
(cvt ) { .readtable } | |
- (fpgm) 1 index | |
- (prep) 1 index | |
- (GSUB) 1 index | |
+ (fpgm) { .readtable } | |
+ (prep) { .readtable } | |
+ (GSUB) { .readtable } | |
.dicttomark | |
% Normally there would be a 'readonly' here, but the ttf2pf utility wants | |
% to include the 'kern' table as well, so we leave the readtables dictionary | |
@@ -918,10 +966,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] | |
@@ -942,11 +997,11 @@ | |
% The Apple cmap format is no help in determining the encoding. | |
% Look for a Microsoft table. If we can't find one, | |
% just use the first table, whatever it is. | |
- dup 4 8 getinterval exch % the default | |
- 0 1 2 index 2 getu16 1 sub { | |
- 8 mul 4 add 1 index exch 8 getinterval | |
- dup 0 getu16 /cmap_platform exch def | |
- dup 2 getu16 /cmap_encoding exch def | |
+ dup 4 8 .biggetinterval exch % the default | |
+ 0 1 2 index 2 .biggetu16 1 sub { | |
+ 8 mul 4 add 1 index exch 8 .biggetinterval | |
+ dup 0 .biggetu16 /cmap_platform exch def | |
+ dup 2 .biggetu16 /cmap_encoding exch def | |
DEBUG { | |
(cmap: platform ) print cmap_platform =only | |
( encoding ) print cmap_encoding = flush | |
@@ -955,7 +1010,7 @@ | |
} for | |
% Stack: subentry table | |
/cmapsub 2 index def | |
- exch 4 getu32 1 index length 1 index sub getinterval | |
+ exch 4 .biggetu32 1 index .biglength 1 index sub .biggetinterval | |
/cmaptab exch def | |
} bind def | |
@@ -1097,9 +1152,26 @@ | |
% 4 2 Offset Coverage(--) | |
% 6 2 uint16 GlyphCount | |
% 8 2 GlyphID Substitute(vertically oriented glyphs) | |
-% -- 2 uint16 SubstFormat | |
-% +2 2 uint16 GlyphCount(same as above GlyphCount) | |
-% +4 2 GlyphID GlyphArray(horizontally oriented glyphs) | |
+% | |
+% [Coverage Format 1, Individual glyph indices] | |
+% Index Size Type Name of Entry | |
+% ----------------------------------- | |
+% 0 2 uint16 CoverageFormat (Format identifier-format = 1) | |
+% 2 2 uint16 GlyphCount (same as above GlyphCount) | |
+% 4 2 GlyphID GlyphArray (horizontally oriented glyphs) | |
+% | |
+% [Coverage Format 2, Range of glyphs | |
+% Index Size Type Name of Entry | |
+% ----------------------------------- | |
+% 0 2 uint16 CoverageFormat (Format identifier-format = 2) | |
+% 2 2 uint16 RangeCount | |
+% 4 2 struct RangeRecord[RangeCount] | |
+% [RangeRecord] | |
+% Index Size Type Name of Entry | |
+% ----------------------------------- | |
+% 0 2 GlyphID First GlyphID in the range | |
+% 2 2 GlyphID Last GlyphID in the range | |
+% 4 2 uint16 Coverage Index of first GlpyhID in range | |
% ----------------------------------- | |
% References | |
% 1. http://www.microsoft.com/typography/OTSPEC/gsub.htm | |
@@ -1110,50 +1182,101 @@ | |
/gsubh2v null def | |
tabdict /GSUB .knownget { % if | |
dup /gsubver exch 0 getu32 def | |
- %dup /gsubosl exch 4 getu16 12 add def | |
- %dup /gsubofl exch 6 getu16 12 add def | |
- dup /gsuboll exch 8 getu16 12 add def | |
+ %dup /gsubosl exch 4 getu16 def | |
+ %dup /gsubofl exch 6 getu16 def | |
+ dup /gsuboll exch 8 getu16 def | |
DEBUG { | |
(gsubver: ) print gsubver = | |
%(gsubosl: ) print gsubosl = | |
%(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 /gsubltype exch gsubolt 0 add getu16 def | |
+ dup /gsublflag exch gsubolt 2 add getu16 def | |
+ dup /gsubsubc exch gsubolt 4 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 = | |
+ (gsubolt: ) print gsubolt = | |
+ (gsubltype: ) print gsubltype = | |
+ (gsublflag: ) print gsublflag = | |
+ (gsubsubc: ) print gsubsubc = | |
+ } if | |
+ gsubsubc 0 ne { | |
+ 0 1 gsubsubc 1 sub { | |
+ 2 mul /gsubost exch 2 index exch gsubolt 6 add add getu16 gsubolt add def | |
+ dup /substfmt exch gsubost 0 add getu16 def | |
+ DEBUG { | |
+ (gsubost: ) print gsubost = | |
+ (substfmt: ) print substfmt = | |
+ } if | |
+% gsubver 16#00010000 eq { % ifelse | |
+ gsubltype 1 eq substfmt 2 eq and { % ifelse | |
+ dup /gsubocv exch gsubost 2 add getu16 def | |
+ dup /gsubglc exch gsubost 4 add getu16 def | |
+ % hacked by suzuki toshiya at 2001/3/6 | |
+ %dup /gsubvog exch gsubost 6 add gsubglc getinterval def | |
+ %dup /gsubhog exch gsubost gsubocv add 4 add gsubglc getinterval def | |
+ dup /gsubvog exch gsubost 6 add gsubglc 2 mul getinterval def | |
+ dup /cvfmt exch gsubost gsubocv add 0 add getu16 def | |
+ dup /cvglc exch gsubost gsubocv add 2 add getu16 def | |
+ dup /gsubhog exch gsubost gsubocv add 4 add cvglc 2 mul getinterval def | |
+ DEBUG { | |
+ (gsubocv: ) print gsubocv = | |
+ (gsubglc: ) print gsubglc = | |
+ (cvfmt: ) print cvfmt = | |
+ | |
+ (gsubhog->gsubvog ) = | |
+ 0 2 gsubhog length 2 sub { % for | |
+ dup | |
+ gsubhog exch getu16 =only | |
+ (->) =only | |
+ gsubvog exch getu16 = | |
+ } for | |
+ } if | |
+ cvfmt 1 eq { | |
+ /gsubh2v << 0 2 gsubhog length 2 sub { | |
+ dup gsubhog exch getu16 | |
+ exch gsubvog exch getu16 | |
+ } for >> def | |
+ } { | |
+ cvfmt 2 eq { | |
+ /gsubh2v << 0 6 gsubhog length 6 sub { | |
+ dup 0 add /fgid exch gsubhog exch getu16 def | |
+ dup 2 add /lgid exch gsubhog exch getu16 def | |
+ 4 add /cvidx exch gsubhog exch getu16 def | |
+ DEBUG { | |
+ (fgid: ) print fgid = | |
+ (lgid: ) print lgid = | |
+ (cvidx: ) print cvidx = | |
+ } if | |
+ fgid 1 lgid { | |
+ dup cvidx add fgid sub | |
+ exch gsubvog exch getu16 | |
+ } for | |
+ } for >> def | |
+ } { | |
+ %(UNKNWON COVERAGE FORMAT.) = flush | |
+ } ifelse | |
+ } ifelse | |
+ } { | |
+ %(UNKNOWN GSUB FORMAT.) = flush | |
+ } ifelse | |
+% } { | |
+% (ILLEGAL GSUB VERSION.) = flush | |
+% } ifelse | |
} 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 | |
@@ -1459,7 +1582,7 @@ | |
1 index exch get % {} [[[].].] [[].] [ cid gid num ] | |
cvx exec cmapglyphs % {} [[[].].] [[].] cid gid num gmap | |
3 1 roll .safegetinterval { % {} [[[].].] [[].] cid [gid'..] | |
- 4 index exec dup cmapglyphs 0 get eq { | |
+ 4 index exec dup cmapglyphs 0 get eq 1 index 0 eq or { | |
% found no glyph | |
pop | |
} { | |
@@ -1555,7 +1678,7 @@ | |
/Adobe-CNS1 << | |
/Registry (Adobe) | |
/Ordering (CNS1) | |
- /CIDCounts [ 14099 17408 17601 18846 18962 ] | |
+ /CIDCounts [ 14099 17408 17601 18846 18965 ] | |
/Big5 { 0 { | |
/Adobe-CNS1-ETen-B5 .applyCIDToCode | |
/ETen-B5-V .applyvCMap | |
@@ -1585,7 +1708,7 @@ | |
/Adobe-Japan1 << | |
/Registry (Adobe) | |
/Ordering (Japan1) | |
- /CIDCounts [ 8284 8359 8720 9354 15444 ] | |
+ /CIDCounts [ 8284 8359 8720 9354 15444 20317 23058 ] | |
/ShiftJIS { 2 { | |
/Adobe-Japan1-90ms-RKSJ .applyCIDToCode | |
/90ms-RKSJ-V .applyvCMap | |
diff -urxN ghostscript-7.07.orig/lib/gsbj ghostscript-7.07/lib/gsbj | |
--- ghostscript-7.07.orig/lib/gsbj Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gsbj Mon May 19 21:23:32 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gsbj,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -sDEVICE=bj10e -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
+gswin32c -q -sDEVICE=bj10e -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gsdj ghostscript-7.07/lib/gsdj | |
--- ghostscript-7.07.orig/lib/gsdj Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gsdj Mon May 19 21:23:42 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gsdj,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -sDEVICE=deskjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
+gswin32c -q -sDEVICE=deskjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gsdj500 ghostscript-7.07/lib/gsdj500 | |
--- ghostscript-7.07.orig/lib/gsdj500 Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gsdj500 Mon May 19 21:23:52 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gsdj500,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -sDEVICE=djet500 -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
+gswin32c -q -sDEVICE=djet500 -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gslj ghostscript-7.07/lib/gslj | |
--- ghostscript-7.07.orig/lib/gslj Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gslj Mon May 19 21:24:02 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gslj,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -sDEVICE=laserjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
+gswin32c -q -sDEVICE=laserjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gslp ghostscript-7.07/lib/gslp | |
--- ghostscript-7.07.orig/lib/gslp Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gslp Mon May 19 21:24:10 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gslp,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -sDEVICE=epson -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
+gswin32c -q -sDEVICE=epson -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@" | |
diff -urxN ghostscript-7.07.orig/lib/gsnd ghostscript-7.07/lib/gsnd | |
--- ghostscript-7.07.orig/lib/gsnd Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/gsnd Mon May 19 21:24:18 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: gsnd,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -DNODISPLAY "$@" | |
+gswin32c -DNODISPLAY "$@" | |
diff -urxN ghostscript-7.07.orig/lib/pdf2dsc ghostscript-7.07/lib/pdf2dsc | |
--- ghostscript-7.07.orig/lib/pdf2dsc Fri Dec 29 14:03:49 2000 | |
+++ ghostscript-7.07/lib/pdf2dsc Mon May 19 21:24:34 2003 | |
@@ -22,5 +22,5 @@ | |
dscfile=$2 | |
: ${dscfile:=`echo $pdffile | sed 's,\.[^/.]*,,'`.dsc} | |
-exec gs -q -dNODISPLAY -dSAFER -dDELAYSAFER\ | |
+gswin32c -q -dNODISPLAY -dSAFER -dDELAYSAFER\ | |
-sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps -c quit | |
diff -urxN ghostscript-7.07.orig/lib/pdf2ps ghostscript-7.07/lib/pdf2ps | |
--- ghostscript-7.07.orig/lib/pdf2ps Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/pdf2ps Mon May 19 21:24:58 2003 | |
@@ -26,4 +26,4 @@ | |
# Doing an initial 'save' helps keep fonts from being flushed between pages. | |
# We have to include the options twice because -I only takes effect if it | |
# appears before other options. | |
-exec gs $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1" | |
+gswin32c $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1" | |
diff -urxN ghostscript-7.07.orig/lib/pdfopt ghostscript-7.07/lib/pdfopt | |
--- ghostscript-7.07.orig/lib/pdfopt Mon Jul 23 15:57:27 2001 | |
+++ ghostscript-7.07/lib/pdfopt Mon May 19 21:25:14 2003 | |
@@ -17,4 +17,4 @@ | |
exit 1 | |
fi | |
-exec gs -q -dNODISPLAY $OPTIONS -- pdfopt.ps "$1" "$2" | |
+gswin32c -q -dNODISPLAY $OPTIONS -- pdfopt.ps "$1" "$2" | |
diff -urxN ghostscript-7.07.orig/lib/pf2afm ghostscript-7.07/lib/pf2afm | |
--- ghostscript-7.07.orig/lib/pf2afm Sun Feb 04 06:31:40 2001 | |
+++ ghostscript-7.07/lib/pf2afm Mon May 19 21:25:24 2003 | |
@@ -5,4 +5,4 @@ | |
# Output goes to fontfilename.afm, which must not already exist. | |
# See pf2afm.ps for more details. | |
-exec gs -q -dNODISPLAY -dSAFER -dDELAYSAFER -- pf2afm.ps "$@" | |
+gswin32c -q -dNODISPLAY -dSAFER -dDELAYSAFER -- pf2afm.ps "$@" | |
diff -urxN ghostscript-7.07.orig/lib/pfbtopfa ghostscript-7.07/lib/pfbtopfa | |
--- ghostscript-7.07.orig/lib/pfbtopfa Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/pfbtopfa Mon May 19 21:25:36 2003 | |
@@ -13,4 +13,4 @@ | |
exit 1 | |
fi | |
-exec gs -q -dNODISPLAY -- pfbtopfa.ps "$1" "$outfile" | |
+gswin32c -q -dNODISPLAY -- pfbtopfa.ps "$1" "$outfile" | |
diff -urxN ghostscript-7.07.orig/lib/pphs ghostscript-7.07/lib/pphs | |
--- ghostscript-7.07.orig/lib/pphs Mon Jul 16 01:25:02 2001 | |
+++ ghostscript-7.07/lib/pphs Mon May 19 21:25:52 2003 | |
@@ -4,4 +4,4 @@ | |
# pphs filename.pdf | |
# Output goes to stdout. | |
-exec gs -q -dNODISPLAY -- pphs.ps "$@" | |
+gswin32c -q -dNODISPLAY -- pphs.ps "$@" | |
diff -urxN ghostscript-7.07.orig/lib/printafm ghostscript-7.07/lib/printafm | |
--- ghostscript-7.07.orig/lib/printafm Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/printafm Mon May 19 21:26:02 2003 | |
@@ -4,4 +4,4 @@ | |
# printafm fontname | |
# Output goes to stdout. | |
-exec gs -q -dNODISPLAY -- printafm.ps "$@" | |
+gswin32c -q -dNODISPLAY -- printafm.ps "$@" | |
diff -urxN ghostscript-7.07.orig/lib/ps2ascii ghostscript-7.07/lib/ps2ascii | |
--- ghostscript-7.07.orig/lib/ps2ascii Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/ps2ascii Mon May 19 21:26:28 2003 | |
@@ -6,13 +6,13 @@ | |
# If both infile and outfile are omitted, ps2ascii acts as a filter, | |
# reading from stdin and writing on stdout. | |
-trap "rm -f _temp_.err _temp_.out" 0 1 2 15 | |
+trap "rm -f _temp_.err _temp_.out" 0 2 15 | |
OPTIONS="-q -dNODISPLAY -dSAFER -dNOBIND -dWRITESYSTEMDICT -dSIMPLE" | |
if ( test $# -eq 0 ) then | |
- gs $OPTIONS -c save -f ps2ascii.ps - -c quit | |
+ gswin32c $OPTIONS -c save -f ps2ascii.ps - -c quit | |
elif ( test $# -eq 1 ) then | |
- gs $OPTIONS -c save -f ps2ascii.ps "$1" -c quit | |
+ gswin32c $OPTIONS -c save -f ps2ascii.ps "$1" -c quit | |
else | |
- gs $OPTIONS -c save -f ps2ascii.ps "$1" -c quit >"$2" | |
+ gswin32c $OPTIONS -c save -f ps2ascii.ps "$1" -c quit >"$2" | |
fi | |
diff -urxN ghostscript-7.07.orig/lib/ps2epsi ghostscript-7.07/lib/ps2epsi | |
--- ghostscript-7.07.orig/lib/ps2epsi Tue Apr 23 05:18:24 2002 | |
+++ ghostscript-7.07/lib/ps2epsi Mon May 19 21:30:52 2003 | |
@@ -1,7 +1,7 @@ | |
#!/bin/sh | |
# $Id: ps2epsi,v 1.7.2.1 2002/04/22 20:18:24 giles Exp $ | |
-tmpfile=/tmp/ps2epsi$$ | |
+tmpfile=./ps2epsi$$ | |
export outfile | |
@@ -27,7 +27,7 @@ | |
fi | |
ls -l "${infile}" | | |
-awk 'F==1 { | |
+gawk 'F==1 { | |
cd="%%CreationDate: " $6 " " $7 " " $8; | |
t="%%Title: " $9; | |
f="%%For:" U " " $3; | |
@@ -51,7 +51,7 @@ | |
} | |
' U="$USERNAME$LOGNAME" F=1 - F=2 "${infile}" >$tmpfile | |
-gs -q -dNOPAUSE -dSAFER -dDELAYSAFER -r72 -sDEVICE=bit -sOutputFile=/dev/null $tmpfile ps2epsi.ps $tmpfile <"${infile}" 1>&2 | |
+gswin32c -q -dNOPAUSE -dSAFER -dDELAYSAFER -r72 -sDEVICE=bit -sOutputFile=nul $tmpfile ps2epsi.ps $tmpfile <"${infile}" 1>&2 | |
rm -f $tmpfile | |
( | |
diff -urxN ghostscript-7.07.orig/lib/ps2pdf ghostscript-7.07/lib/ps2pdf | |
--- ghostscript-7.07.orig/lib/ps2pdf Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/ps2pdf Mon May 19 21:27:30 2003 | |
@@ -4,4 +4,4 @@ | |
# Currently, we produce PDF 1.2 by default, but this is not guaranteed | |
# not to change in the future. | |
-exec ps2pdf12 "$@" | |
+ps2pdf12 "$@" | |
diff -urxN ghostscript-7.07.orig/lib/ps2pdf12 ghostscript-7.07/lib/ps2pdf12 | |
--- ghostscript-7.07.orig/lib/ps2pdf12 Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/ps2pdf12 Mon May 19 21:27:38 2003 | |
@@ -2,4 +2,4 @@ | |
# $Id: ps2pdf12,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
# Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible). | |
-exec ps2pdfwr -dCompatibilityLevel=1.2 "$@" | |
+ps2pdfwr -dCompatibilityLevel=1.2 "$@" | |
diff -urxN ghostscript-7.07.orig/lib/ps2pdf13 ghostscript-7.07/lib/ps2pdf13 | |
--- ghostscript-7.07.orig/lib/ps2pdf13 Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/ps2pdf13 Mon May 19 21:27:46 2003 | |
@@ -2,4 +2,4 @@ | |
# $Id: ps2pdf13,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
# Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible). | |
-exec ps2pdfwr -dCompatibilityLevel=1.3 "$@" | |
+ps2pdfwr -dCompatibilityLevel=1.3 "$@" | |
diff -urxN ghostscript-7.07.orig/lib/ps2pdf14 ghostscript-7.07/lib/ps2pdf14 | |
--- ghostscript-7.07.orig/lib/ps2pdf14 Mon Sep 11 04:33:47 2000 | |
+++ ghostscript-7.07/lib/ps2pdf14 Mon May 19 21:27:52 2003 | |
@@ -2,4 +2,4 @@ | |
# $Id: ps2pdf14,v 1.1 2000/09/10 19:33:47 lpd Exp $ | |
# Convert PostScript to PDF 1.4 (Acrobat 5-and-later compatible). | |
-exec ps2pdfwr -dCompatibilityLevel=1.4 "$@" | |
+ps2pdfwr -dCompatibilityLevel=1.4 "$@" | |
diff -urxN ghostscript-7.07.orig/lib/ps2pdfwr ghostscript-7.07/lib/ps2pdfwr | |
--- ghostscript-7.07.orig/lib/ps2pdfwr Wed Jan 23 06:34:04 2002 | |
+++ ghostscript-7.07/lib/ps2pdfwr Tue Sep 29 02:20:33 2015 | |
@@ -31,6 +31,210 @@ | |
outfile="$2" | |
fi | |
+[ "$NeverEmbedFontList" != "" ] || NeverEmbedFontList=" | |
+/Courier | |
+/Courier-Bold | |
+/Courier-BoldOblique | |
+/Courier-Oblique | |
+/Helvetica | |
+/Helvetica-Bold | |
+/Helvetica-BoldOblique | |
+/Helvetica-Oblique | |
+/Symbol | |
+/Times-Bold | |
+/Times-BoldItalic | |
+/Times-Italic | |
+/Times-Roman | |
+/ZapfDingbats | |
+" | |
+[ "$AlwaysEmbedFontList" != "" ] || AlwaysEmbedFontList=" | |
+/AvantGarde-Book | |
+/AvantGarde-BookOblique | |
+/AvantGarde-Demi | |
+/AvantGarde-DemiOblique | |
+/Bookman-Demi | |
+/Bookman-DemiItalic | |
+/Bookman-Light | |
+/Bookman-LightItalic | |
+/Helvetica-Narrow | |
+/Helvetica-Narrow-Bold | |
+/Helvetica-Narrow-BoldOblique | |
+/Helvetica-Narrow-Oblique | |
+/Palatino-Bold | |
+/Palatino-BoldItalic | |
+/Palatino-Italic | |
+/Palatino-Roman | |
+/ZapfChancery-MediumItalic | |
+ | |
+/Arial-BoldItalicMT | |
+/Arial-BoldMT | |
+/Arial-ItalicMT | |
+/ArialMT | |
+/ArialNarrow | |
+/ArialNarrow-Bold | |
+/ArialNarrow-BoldItalic | |
+/ArialNarrow-Italic | |
+/BookmanOldStyle | |
+/BookmanOldStyle-Bold | |
+/BookmanOldStyle-BoldItalic | |
+/BookmanOldStyle-Italic | |
+/CenturyGothic | |
+/CenturyGothic-Bold | |
+/CenturyGothic-BoldItalic | |
+/CenturyGothic-Italic | |
+/CourierNewPS-BoldItalicMT | |
+/CourierNewPS-BoldMT | |
+/CourierNewPS-ItalicMT | |
+/CourierNewPSMT | |
+/NewCenturySchlbk-Bold | |
+/NewCenturySchlbk-BoldItalic | |
+/NewCenturySchlbk-Italic | |
+/NewCenturySchlbk-Roman | |
+/PalatinoLinotype-Bold | |
+/PalatinoLinotype-BoldItalic | |
+/PalatinoLinotype-Italic | |
+/PalatinoLinotype-Roman | |
+/TimesNewRomanPS-BoldItalicMT | |
+/TimesNewRomanPS-BoldMT | |
+/TimesNewRomanPS-ItalicMT | |
+/TimesNewRomanPSMT | |
+" | |
+[ "$NeverEmbedCIDFontList" != "" ] || NeverEmbedCIDFontList=" | |
+/MSung-Light | |
+/MSung-Medium | |
+/MHei-Medium | |
+/MKai-Medium | |
+/STSong-Light | |
+/STFangsong-Light | |
+/STHeiti-Regular | |
+/STKaiti-Regular | |
+/Ryumin-Light | |
+/GothicBBB-Medium | |
+/HeiseiMin-W3 | |
+/HeiseiKakuGo-W5 | |
+/KozMin-Regular | |
+/KozMinPro-Regular | |
+/KozMinProVI-Regular | |
+/KozGoPro-Medium | |
+/HYGoThic-Medium | |
+/HYGungSo-Bold | |
+/HYKHeadLine-Bold | |
+/HYKHeadLine-Medium | |
+/HYSMyeongJo-Medium | |
+/HYRGoThic-Medium | |
+ | |
+/MOEKai-Regular | |
+/MOESung-Regular | |
+/WadaGo-Bold | |
+/WadaMaruGo-Regular | |
+/WadaMaruGo-RegularH | |
+/WadaMin-Bold | |
+/WadaMin-Regular | |
+/WadaMin-RegularH | |
+/Munhwa-Bold | |
+/Munhwa-Regular | |
+/MunhwaGothic-Bold | |
+/MunhwaGothic-Regular | |
+/MunhwaGungSeo-Bold | |
+/MunhwaGungSeo-Light | |
+/MunhwaGungSeoHeulim-Bold | |
+/MunhwaGungSeoHeulim-Light | |
+/MunhwaHoonMin-Regular | |
+ | |
+/ZenKai-Medium | |
+/ShanHeiSun-Light | |
+/MingLiU | |
+/PMingLiU | |
+/LiHeiPro-Medium | |
+/LiSongPro-Light | |
+/BousungEG-Light-GB | |
+/GBZenKai-Medium | |
+/SimHei | |
+/SimSun | |
+/NSimSun | |
+/STHeiti-Regular | |
+/STHeiti-Light | |
+/STFangsong-Regular | |
+/STSong-Regular | |
+/STKaiti-Regular | |
+/HGGothicE | |
+/HGGothicEPRO | |
+/HGGothicM | |
+/HGGyoshotai | |
+/HGMarugothicMPRO | |
+/HGPGothicE | |
+/HGPGothicM | |
+/HGPGyoshotai | |
+/HGPSoeiKakugothicUB | |
+/HGPSoeiKakupoptai | |
+/HGSGothicE | |
+/HGSGothicM | |
+/HGSGyoshotai | |
+/HGSSoeiKakugothicUB | |
+/HGSSoeiKakupoptai | |
+/HGSeikaishotaiPRO | |
+/HGSoeiKakugothicUB | |
+/HGSoeiKakupoptai | |
+/HiraKakuPro-W3 | |
+/HiraKakuPro-W6 | |
+/HiraKakuStd-W8 | |
+/HiraMaruPro-W4 | |
+/HiraMinPro-W3 | |
+/HiraMinPro-W6 | |
+/Kochi-Gothic | |
+/Kochi-Mincho | |
+/Sazanami-Gothic-Regular | |
+/Sazanami-Mincho-Regular | |
+/IPAGothic | |
+/IPAMincho | |
+/IPAPGothic | |
+/IPAPMincho | |
+/IPAUIGothic | |
+/MojikumiKata-EB | |
+/Mona | |
+/MS-Mincho | |
+/MS-PMincho | |
+/MS-Gothic | |
+/MS-PGothic | |
+/MS-UIGothic | |
+/Batang | |
+/BatangChe | |
+/Gungsuh | |
+/GungsuhChe | |
+/Gulim | |
+/GulimChe | |
+/Dotum | |
+/DotumChe | |
+/New-Gulim | |
+/Baekmuk-Batang | |
+/Baekmuk-Dotum | |
+/Baekmuk-Gulim | |
+/Baekmuk-Headline | |
+ | |
+/MHei-Medium-Acro | |
+/MSung-Light-Acro | |
+/AdobeMingStd-Light-Acro | |
+/AdobeMingStd-Light | |
+/STSong-Light-Acro | |
+/AdobeSongStd-Light-Acro | |
+/AdobeSongStd-Light | |
+/HeiseiKakuGo-W5-Acro | |
+/HeiseiMin-W3-Acro | |
+/KozGoPro-Medium-Acro | |
+/KozMinPro-Regular-Acro | |
+/KozMinProVI-Regular-Acro | |
+/HYGoThic-Medium-Acro | |
+/HYSMyeongJo-Medium-Acro | |
+/AdobeMyungjoStd-Medium-Acro | |
+/AdobeMyungjoStd-Medium | |
+" | |
+[ "$AlwaysEmbedCIDFontList" != "" ] || AlwaysEmbedCIDFontList=" | |
+/SimSun-18030-Adobe-CNS1 | |
+/NSimSun-18030-Adobe-CNS1 | |
+/SimSun-18030 | |
+/NSimSun-18030 | |
+/SimSun-Adobe-CNS1 | |
+" | |
# We have to include the options twice because -I only takes effect if it | |
# appears before other options. | |
-exec gs $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$infile" | |
+gswin32c $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=$outfile" $OPTIONS -c ".setpdfwrite <</NeverEmbed [$NeverEmbedFontList $NeverEmbedCIDFontList] /AlwaysEmbed [$AlwaysEmbedFontList $AlwaysEmbedCIDFontList]>> setdistillerparams" -f "$infile" | |
diff -urxN ghostscript-7.07.orig/lib/ps2ps ghostscript-7.07/lib/ps2ps | |
--- ghostscript-7.07.orig/lib/ps2ps Sat Jun 23 01:09:22 2001 | |
+++ ghostscript-7.07/lib/ps2ps Mon May 19 21:28:28 2003 | |
@@ -17,4 +17,4 @@ | |
exit 1 | |
fi | |
-exec gs -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1" | |
+gswin32c -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1" | |
diff -urxN ghostscript-7.07.orig/lib/pv.sh ghostscript-7.07/lib/pv.sh | |
--- ghostscript-7.07.orig/lib/pv.sh Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/pv.sh Tue Sep 29 02:17:49 2015 | |
@@ -30,8 +30,8 @@ | |
shift | |
FILE=$1 | |
shift | |
-trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15 | |
+trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 2 15 | |
#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv | |
-dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv | |
-gs $FILE.$$.pv | |
+dvips -Ppdf -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv | |
+gswin32 $FILE.$$.pv | |
exit 0 | |
diff -urxN ghostscript-7.07.orig/lib/wftopfa ghostscript-7.07/lib/wftopfa | |
--- ghostscript-7.07.orig/lib/wftopfa Thu Mar 09 17:40:40 2000 | |
+++ ghostscript-7.07/lib/wftopfa Mon May 19 21:29:28 2003 | |
@@ -1,3 +1,3 @@ | |
#!/bin/sh | |
# $Id: wftopfa,v 1.1 2000/03/09 08:40:40 lpd Exp $ | |
-exec gs -q -dNODISPLAY -- wftopfa.ps "$@" | |
+gswin32c -q -dNODISPLAY -- wftopfa.ps "$@" | |
diff -urxN ghostscript-7.07.orig/src/gdevpdff.c ghostscript-7.07/src/gdevpdff.c | |
--- ghostscript-7.07.orig/src/gdevpdff.c Fri Jan 17 09:49:01 2003 | |
+++ ghostscript-7.07/src/gdevpdff.c Tue Sep 29 01:34:52 2015 | |
@@ -276,6 +276,11 @@ | |
const byte *chars = font->font_name.chars; | |
uint size = font->font_name.size; | |
+ /* CIDFonts has null string in font_name, key_name is used */ | |
+ if (0 == size) { | |
+ chars = font->key_name.chars; | |
+ size = font->key_name.size; | |
+ } | |
/* | |
* The behavior of Acrobat Distiller changed between 3.0 (PDF 1.2), | |
* which will never embed the base 14 fonts, and 4.0 (PDF 1.3), which | |
@@ -720,19 +725,22 @@ | |
same &= ~FONT_SAME_METRICS; | |
break; | |
case FONT_EMBED_NO: | |
- /* | |
- * Per the PDF 1.3 documentation, there are only 3 BaseEncoding | |
- * values allowed for non-embedded fonts. Pick one here. | |
- */ | |
- BaseEncoding = | |
- ((const gs_font_base *)base_font)->nearest_encoding_index; | |
- switch (BaseEncoding) { | |
- default: | |
- BaseEncoding = ENCODING_INDEX_WINANSI; | |
- case ENCODING_INDEX_WINANSI: | |
- case ENCODING_INDEX_MACROMAN: | |
- case ENCODING_INDEX_MACEXPERT: | |
- break; | |
+ if (!(font->FontType == ft_CID_encrypted || | |
+ font->FontType == ft_CID_TrueType)) { | |
+ /* | |
+ * Per the PDF 1.3 documentation, there are only 3 BaseEncoding | |
+ * values allowed for non-embedded fonts. Pick one here. | |
+ */ | |
+ BaseEncoding = | |
+ ((const gs_font_base *)base_font)->nearest_encoding_index; | |
+ switch (BaseEncoding) { | |
+ default: | |
+ BaseEncoding = ENCODING_INDEX_WINANSI; | |
+ case ENCODING_INDEX_WINANSI: | |
+ case ENCODING_INDEX_MACROMAN: | |
+ case ENCODING_INDEX_MACEXPERT: | |
+ break; | |
+ } | |
} | |
code = pdf_compute_font_descriptor(pdev, &fdesc, font, NULL); | |
if (code < 0) | |
@@ -888,6 +896,7 @@ | |
memcpy(ppf->widths_known, ftemp_widths_known, | |
sizeof(ftemp_widths_known)); | |
} | |
+ ppf->embed = embed; | |
code = pdf_register_font(pdev, font, ppf); | |
*pppf = ppf; | |
diff -urxN ghostscript-7.07.orig/src/gdevpdff.h ghostscript-7.07/src/gdevpdff.h | |
--- ghostscript-7.07.orig/src/gdevpdff.h Fri Jan 17 09:49:01 2003 | |
+++ ghostscript-7.07/src/gdevpdff.h Tue Sep 29 01:34:52 2015 | |
@@ -117,6 +117,12 @@ | |
FONT_SUBSET_NO | |
} pdf_font_do_subset_t; | |
+typedef enum { | |
+ FONT_EMBED_STANDARD, /* 14 standard fonts */ | |
+ FONT_EMBED_NO, | |
+ FONT_EMBED_YES | |
+} pdf_font_embed_t; | |
+ | |
struct pdf_font_descriptor_s { | |
pdf_resource_common(pdf_font_descriptor_t); | |
pdf_font_name_t FontName; | |
@@ -198,6 +204,7 @@ | |
gs_font *font; /* non-0 iff font will notify us; */ | |
/* should be a weak pointer */ | |
int index; /* in pdf_standard_fonts, -1 if not base 14 */ | |
+ pdf_font_embed_t embed; /* status of pdf_font_embed_status() */ | |
gs_matrix orig_matrix; /* FontMatrix of unscaled font for embedding */ | |
bool is_MM_instance; /* for Type 1/2 fonts, true iff the font */ | |
/* is a Multiple Master instance */ | |
@@ -319,12 +326,6 @@ | |
/* ---------------- Exported by gdevpdfs.c for gdevpdft.c ---------------- */ | |
/* ---------------- Exported by gdevpdff.c ---------------- */ | |
- | |
-typedef enum { | |
- FONT_EMBED_STANDARD, /* 14 standard fonts */ | |
- FONT_EMBED_NO, | |
- FONT_EMBED_YES | |
-} pdf_font_embed_t; | |
typedef struct pdf_standard_font_s { | |
const char *fname; | |
diff -urxN ghostscript-7.07.orig/src/gdevpdfs.c ghostscript-7.07/src/gdevpdfs.c | |
--- ghostscript-7.07.orig/src/gdevpdfs.c Fri Jan 17 09:49:01 2003 | |
+++ ghostscript-7.07/src/gdevpdfs.c Tue Sep 29 01:34:52 2015 | |
@@ -481,15 +481,21 @@ | |
if (cid < pfd->chars_count) { | |
int index = cid >> 3, mask = 0x80 >> (cid & 7); | |
+ int gid; | |
+ | |
+ if (!(pfd->chars_used.data[index] & mask) || | |
+ !(psubf->widths_known[index] & mask)) { | |
- if (!(pfd->chars_used.data[index] & mask)) { | |
- pfd->chars_used.data[index] |= mask; | |
if (psubf->CIDToGIDMap) { | |
gs_font_cid2 *const subfont2 = | |
(gs_font_cid2 *)subfont; | |
- int gid = | |
- subfont2->cidata.CIDMap_proc(subfont2, glyph); | |
+ gid = subfont2->cidata.CIDMap_proc(subfont2, glyph); | |
+ } | |
+ } | |
+ if (!(pfd->chars_used.data[index] & mask)) { | |
+ pfd->chars_used.data[index] |= mask; | |
+ if (psubf->CIDToGIDMap) { | |
if (gid >= 0) { | |
psubf->CIDToGIDMap[cid] = gid; | |
mark_glyphs_used(subfont, gid + gs_min_cid_glyph, | |
@@ -500,7 +506,11 @@ | |
if (!(psubf->widths_known[index] & mask)) { | |
int width; | |
- code = pdf_glyph_width(psubf, glyph, subfont, &width); | |
+ if (psubf->CIDToGIDMap) | |
+ code = pdf_glyph_width(psubf, gid + gs_min_cid_glyph, | |
+ subfont, &width); | |
+ else | |
+ code = pdf_glyph_width(psubf, glyph, subfont, &width); | |
if (code == 0) { | |
psubf->Widths[cid] = width; | |
psubf->widths_known[index] |= mask; | |
diff -urxN ghostscript-7.07.orig/src/gdevpdfw.c ghostscript-7.07/src/gdevpdfw.c | |
--- ghostscript-7.07.orig/src/gdevpdfw.c Fri Jan 17 09:49:01 2003 | |
+++ ghostscript-7.07/src/gdevpdfw.c Tue Sep 29 01:34:52 2015 | |
@@ -348,18 +348,19 @@ | |
/* Use the most common width as DW. */ | |
{ | |
- ushort counts[1001]; | |
+ ushort counts[1500*2]; /* histogram of (-1500..1500) */ | |
int dw_count = 0, i; | |
memset(counts, 0, sizeof(counts)); | |
while (!psf_enumerate_glyphs_next(&genum, &glyph)) { | |
- int width = ppf->Widths[glyph - gs_min_cid_glyph]; | |
+ int cid = glyph - gs_min_cid_glyph; | |
+ int width = ppf->Widths[cid]; | |
- counts[min(width, countof(counts) - 1)]++; | |
+ counts[max(0,min(width+countof(counts)/2,countof(counts)-1))]++; | |
} | |
- for (i = 0; i < countof(counts); ++i) | |
+ for (i = 0; i < countof(counts); i++) | |
if (counts[i] > dw_count) | |
- dw = i, dw_count = counts[i]; | |
+ dw = i - countof(counts)/2, dw_count = counts[i]; | |
if (dw != 0) | |
pprintd1(s, "/DW %d\n", dw); | |
} | |
@@ -496,14 +497,16 @@ | |
if (pdf_has_subset_prefix(chars, size)) | |
chars += SUBSET_PREFIX_SIZE, size -= SUBSET_PREFIX_SIZE; | |
pdf_put_name(pdev, chars, size); | |
- if (pef->sub_font_type == ft_CID_encrypted && | |
+ if ((pef->sub_font_type == ft_CID_encrypted || | |
+ pef->sub_font_type == ft_CID_TrueType) && | |
pef->cmapname[0] == '/' | |
) { | |
stream_putc(s, '-'); | |
pdf_put_name_chars(pdev, (const byte*) (pef->cmapname + 1), | |
strlen(pef->cmapname + 1)); | |
} | |
- pprints1(s, "/Encoding %s", pef->cmapname); | |
+ pprints1(s, (pef->cmapname[0] == '/') ? "/Encoding%s" : "/Encoding %s", | |
+ pef->cmapname); | |
pprintld1(s, "/DescendantFonts[%ld 0 R]", | |
pdf_resource_id((const pdf_resource_t *)pef->DescendantFont)); | |
write_Widths = 0; | |
@@ -563,8 +566,10 @@ | |
break; | |
case -1: | |
pdf_write_CIDFont_widths(pdev, pef); | |
- if (pef->FontType == ft_CID_TrueType) | |
- pdf_write_CIDToGIDMap(pdev, pef, &cidmap_id); | |
+ if (pef->FontType == ft_CID_TrueType) { | |
+ if (pef->embed != FONT_EMBED_NO) | |
+ pdf_write_CIDToGIDMap(pdev, pef, &cidmap_id); | |
+ } | |
break; | |
} | |
if (pef->Differences) { | |
diff -urxN ghostscript-7.07.orig/src/gdevpsf2.c ghostscript-7.07/src/gdevpsf2.c | |
--- ghostscript-7.07.orig/src/gdevpsf2.c Fri Jan 17 09:49:01 2003 | |
+++ ghostscript-7.07/src/gdevpsf2.c Tue Sep 29 01:35:01 2015 | |
@@ -901,6 +901,28 @@ | |
*pcount = j; | |
return offset - 1; | |
} | |
+private uint | |
+cff_write_GSubrs_offsets(cff_writer_t *pcw, uint *pcount, gs_font_type1 *pfont) | |
+{ | |
+ int extra_lenIV = cff_extra_lenIV(pcw, pfont); | |
+ int j, offset; | |
+ int code; | |
+ gs_const_string str; | |
+ | |
+ for (j = 0, offset = 1; | |
+ (code = pfont->data.procs.subr_data(pfont, j, true, &str)) != | |
+ gs_error_rangecheck; | |
+ ++j) { | |
+ if (code >= 0 && str.size >= extra_lenIV) | |
+ offset += str.size - extra_lenIV; | |
+ put_offset(pcw, offset); | |
+ if (code > 0) | |
+ gs_free_const_string(pfont->memory, str.data, str.size, | |
+ "cff_write_Subrs_offsets"); | |
+ } | |
+ *pcount = j; | |
+ return offset - 1; | |
+} | |
private void | |
cff_write_Subrs(cff_writer_t *pcw, uint subrs_count, uint subrs_size, | |
gs_font_type1 *pfont) | |
@@ -924,6 +946,29 @@ | |
} | |
} | |
} | |
+private void | |
+cff_write_GSubrs(cff_writer_t *pcw, uint subrs_count, uint subrs_size, | |
+ gs_font_type1 *pfont) | |
+{ | |
+ int j; | |
+ uint ignore_count; | |
+ gs_const_string str; | |
+ int code; | |
+ | |
+ cff_put_Index_header(pcw, subrs_count, subrs_size); | |
+ cff_write_GSubrs_offsets(pcw, &ignore_count, pfont); | |
+ for (j = 0; | |
+ (code = pfont->data.procs.subr_data(pfont, j, true, &str)) != | |
+ gs_error_rangecheck; | |
+ ++j) { | |
+ if (code >= 0) { | |
+ cff_put_CharString(pcw, str.data, str.size, pfont); | |
+ if (code > 0) | |
+ gs_free_const_string(pfont->memory, str.data, str.size, | |
+ "cff_write_Subrs"); | |
+ } | |
+ } | |
+} | |
/* ------ Encoding/charset ------ */ | |
@@ -1471,6 +1516,7 @@ | |
gs_const_string font_name; | |
stream poss; | |
uint charstrings_count, charstrings_size; | |
+ uint gsubrs_count, gsubrs_size; | |
uint charset_size, fdselect_size, fdselect_format; | |
uint subrs_count[256], subrs_size[256]; | |
/* | |
@@ -1479,6 +1525,7 @@ | |
*/ | |
uint | |
Top_size = 0x7fffff, | |
+ GSubrs_offset = 0x7fffff, | |
charset_offset = 0x7fffff, | |
FDSelect_offset = 0x7fffff, | |
CharStrings_offset = 0x7fffff, | |
@@ -1516,6 +1563,8 @@ | |
writer.glyph_data = cid0_glyph_data; | |
writer.offset_size = 1; /* arbitrary */ | |
writer.start_pos = stell(s); | |
+ writer.FontBBox.p.x = writer.FontBBox.p.y = | |
+ writer.FontBBox.q.x = writer.FontBBox.q.y = 0; | |
/* Set the font name. */ | |
if (alt_font_name) | |
@@ -1553,6 +1602,13 @@ | |
FDArray_offsets[j] = Private_offsets[j] = Subrs_offsets[j] = | |
0x7effffff / num_fonts * j + 0x1000000; | |
+ if (cff_convert_charstrings(&writer, | |
+ (const gs_font_base *)pfont->cidata.FDArray[0])) | |
+ gsubrs_count = gsubrs_size = 0; | |
+ else | |
+ gsubrs_size = cff_write_GSubrs_offsets(&writer, &gsubrs_count, | |
+ pfont->cidata.FDArray[0]); | |
+ | |
/* | |
* Compute the size of the charset. For simplicity, we currently | |
* always store the charset explicitly. | |
@@ -1604,10 +1660,11 @@ | |
writer.strm = &poss; | |
/* Compute the offsets. */ | |
- charset_offset = 4 + cff_Index_size(1, font_name.size) + | |
+ GSubrs_offset = 4 + cff_Index_size(1, font_name.size) + | |
cff_Index_size(1, Top_size) + | |
- cff_Index_size(writer.strings.count, writer.strings.total) + | |
- cff_Index_size(0, 0); | |
+ cff_Index_size(writer.strings.count, writer.strings.total); | |
+ charset_offset = GSubrs_offset + | |
+ cff_Index_size(gsubrs_count, gsubrs_size); | |
FDSelect_offset = charset_offset + charset_size; | |
CharStrings_offset = FDSelect_offset + fdselect_size; | |
if_debug3('l', "[l]charset at %u, FDSelect at %u, CharStrings at %u\n", | |
@@ -1636,8 +1693,17 @@ | |
/* Write the strings Index. */ | |
cff_put_Index(&writer, &writer.strings); | |
- /* Write the (empty) gsubrs Index. */ | |
- cff_put_Index_header(&writer, 0, 0); | |
+ /* Write the gsubrs Index. */ | |
+ offset = stell(writer.strm) - start_pos; | |
+ if_debug2('l', "[l]GSubrs = %u => %u\n", GSubrs_offset, offset); | |
+ if (offset > GSubrs_offset) | |
+ gs_note_error(gs_error_rangecheck); | |
+ GSubrs_offset = offset; | |
+ if (gsubrs_count == 0) | |
+ cff_put_Index_header(&writer, 0, 0); | |
+ else | |
+ cff_write_GSubrs(&writer, gsubrs_count, gsubrs_size, | |
+ pfont->cidata.FDArray[0]); | |
/* Write the charset. */ | |
cff_write_cidset(&writer, &genum); | |
@@ -1646,7 +1712,7 @@ | |
offset = stell(writer.strm) - start_pos; | |
if_debug2('l', "[l]FDSelect = %u => %u\n", FDSelect_offset, offset); | |
if (offset > FDSelect_offset) | |
- return_error(offset_error("FDselect")); | |
+ gs_note_error(offset_error("FDselect")); | |
FDSelect_offset = offset; | |
cff_write_FDSelect(&writer, &genum, fdselect_size, fdselect_format); | |
@@ -1654,7 +1720,7 @@ | |
offset = stell(writer.strm) - start_pos; | |
if_debug2('l', "[l]CharStrings = %u => %u\n", CharStrings_offset, offset); | |
if (offset > CharStrings_offset) | |
- return_error(offset_error("CharStrings")); | |
+ gs_note_error(offset_error("CharStrings")); | |
CharStrings_offset = offset; | |
cff_write_CharStrings(&writer, &genum, charstrings_count, | |
charstrings_size); | |
@@ -1663,13 +1729,13 @@ | |
offset = stell(writer.strm) - start_pos; | |
if_debug2('l', "[l]Font = %u => %u\n", Font_offset, offset); | |
if (offset > Font_offset) | |
- return_error(offset_error("Font")); | |
+ gs_note_error(offset_error("Font")); | |
Font_offset = offset; | |
cff_write_FDArray_offsets(&writer, FDArray_offsets, num_fonts); | |
offset = stell(writer.strm) - start_pos; | |
if_debug2('l', "[l]FDArray[0] = %u => %u\n", FDArray_offsets[0], offset); | |
if (offset > FDArray_offsets[0]) | |
- return_error(offset_error("FDArray[0]")); | |
+ gs_note_error(offset_error("FDArray[0]")); | |
FDArray_offsets[0] = offset; | |
for (j = 0; j < num_fonts; ++j) { | |
gs_font_type1 *pfd = pfont->cidata.FDArray[j]; | |
@@ -1686,7 +1752,7 @@ | |
if_debug3('l', "[l]FDArray[%d] = %u => %u\n", j + 1, | |
FDArray_offsets[j + 1], offset); | |
if (offset > FDArray_offsets[j + 1]) | |
- return_error(offset_error("FDArray")); | |
+ gs_note_error(offset_error("FDArray")); | |
FDArray_offsets[j + 1] = offset; | |
} | |
@@ -1698,7 +1764,7 @@ | |
if_debug3('l', "[l]Private[%d] = %u => %u\n", | |
j, Private_offsets[j], offset); | |
if (offset > Private_offsets[j]) | |
- return_error(offset_error("Private")); | |
+ gs_note_error(offset_error("Private")); | |
Private_offsets[j] = offset; | |
if (j == num_fonts) | |
break; | |
@@ -1715,7 +1781,7 @@ | |
if_debug3('l', "[l]Subrs[%d] = %u => %u\n", | |
j, Subrs_offsets[j], offset); | |
if (offset > Subrs_offsets[j]) | |
- return_error(offset_error("Subrs")); | |
+ gs_note_error(offset_error("Subrs")); | |
Subrs_offsets[j] = offset; | |
if (j == num_fonts) | |
break; | |
@@ -1730,7 +1796,7 @@ | |
offset = stell(writer.strm) - start_pos; | |
if_debug2('l', "[l]End = %u => %u\n", End_offset, offset); | |
if (offset > End_offset) | |
- return_error(offset_error("End")); | |
+ gs_note_error(offset_error("End")); | |
if (offset == End_offset) { | |
/* The iteration has converged. Write the result. */ | |
if (writer.strm == &poss) { | |
diff -urxN ghostscript-7.07.orig/src/gsdll32.def ghostscript-7.07/src/gsdll32.def | |
--- ghostscript-7.07.orig/src/gsdll32.def Tue Mar 13 16:09:28 2001 | |
+++ ghostscript-7.07/src/gsdll32.def Tue Sep 29 01:40:57 2015 | |
@@ -1,4 +1,4 @@ | |
-LIBRARY GSDLL32 INITINSTANCE | |
+LIBRARY GSDLL32 | |
DESCRIPTION 'Ghostscript Interpreter DLL' | |
DATA MULTIPLE NONSHARED | |
EXPORTS | |
diff -urxN ghostscript-7.07.orig/src/msvc32.mak ghostscript-7.07/src/msvc32.mak | |
--- ghostscript-7.07.orig/src/msvc32.mak Tue Mar 11 20:59:10 2003 | |
+++ ghostscript-7.07/src/msvc32.mak Sat Oct 17 22:06:20 2015 | |
@@ -88,7 +88,8 @@ | |
# illegal escape. | |
!ifndef GS_LIB_DEFAULT | |
-GS_LIB_DEFAULT=$(GSROOTDIR)/lib;$(AROOTDIR)/fonts | |
+SYSTTF=c:/winnt/fonts;c:/windows/fonts | |
+GS_LIB_DEFAULT=$(GSROOTDIR)/Resource;$(GSROOTDIR)/lib;$(GSROOTDIR)/Resource/Font;$(AROOTDIR)/fonts;$(SYSTTF) | |
!endif | |
# Define whether or not searching for initialization files should always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gs707w32full-20151018.zip を作るためにソースをいじった部分をパッチにしてみた。
がいっぺんに行われたのと同等である。詳しくはこちら。