diff options
| author | Graeme Gregory <dp@xora.org.uk> | 2009-07-13 22:51:33 +0100 |
|---|---|---|
| committer | Graeme Gregory <dp@xora.org.uk> | 2009-07-13 22:51:33 +0100 |
| commit | 6e07d2d3e45221b8f7e57416261d7c98ac4d765d (patch) | |
| tree | 5f307b352faef6421f21d5e4c3626653825bdafc /recipes | |
| parent | 0ad2fd0c195d4466c3a0a4236775bb3622d02b3e (diff) | |
| parent | 7babd08c434f8d1dda59b34201e68f26a4f99f14 (diff) | |
Merge branch 'org.openembedded.dev' of git+ssh://git@git.openembedded.org/openembedded into org.openembedded.dev
Diffstat (limited to 'recipes')
26 files changed, 46024 insertions, 67 deletions
diff --git a/recipes/gnome/libsoup-2.4_2.27.4.bb b/recipes/gnome/libsoup-2.4_2.27.4.bb new file mode 100644 index 0000000000..ae503065c0 --- /dev/null +++ b/recipes/gnome/libsoup-2.4_2.27.4.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "An HTTP library implementation in C" +SECTION = "x11/gnome/libs" +LICENSE = "GPL" +DEPENDS = "libproxy glib-2.0 gnutls libxml2 sqlite3" + +inherit gnome + +SRC_URI = "${GNOME_MIRROR}/libsoup/${@gnome_verdir("${PV}")}/libsoup-${PV}.tar.bz2" +S = "${WORKDIR}/libsoup-${PV}" + +do_stage() { + autotools_stage_all +} + +PACKAGES =+ "libsoup-gnome" +FILES_libsoup-gnome = "${libdir}/libsoup-gnome*.so.*" +FILES_${PN} = "${libdir}/libsoup-2*.so.*" +FILES_${PN}-dev = "${includedir}/ ${libdir}/" +FILES_${PN}-doc = "${datadir}/" diff --git a/recipes/gs/gs/0001_svn_snapshot.patch b/recipes/gs/gs/0001_svn_snapshot.patch new file mode 100644 index 0000000000..4650b11e73 --- /dev/null +++ b/recipes/gs/gs/0001_svn_snapshot.patch @@ -0,0 +1,24362 @@ +Description: /jbig2dec changes r9437 → r9781 (release 8.64 → 2009-06-08) + - subdirs /jasper, /libpng and /jbig2dec skipped + - version bump skipped + - some $Id$ changes suppressed or fuzzy +Author: Jonas Smedegaard <dr@jones.dk> +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -209,7 +209,7 @@ currentdict /DEVICE known not + % during initialization. + /MaxDictStack 500 + /MaxExecStack 5000 +- /MaxOpStack 65414 ++ /MaxOpStack 100000 + .dicttomark .setuserparams + } if + +diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps +--- a/Resource/Init/gs_pdfwr.ps ++++ b/Resource/Init/gs_pdfwr.ps +@@ -665,18 +665,28 @@ currentdict /.pdf_hook_DSC_Creator undef + /MonoImageResolution { } + % Font embedding parameters + /AlwaysEmbed +- { dup length 0 gt +- { dup 0 get false eq ++ { dup length 0 gt ++ { dup 0 get type /booleantype eq } { false } ifelse ++ { dup 0 get ++ { dup length 1 sub 1 exch getinterval ++ } + { dup length 1 sub 1 exch getinterval exch pop /~AlwaysEmbed exch +- } if +- } if ++ } ifelse ++ } ++ { exch pop /.AlwaysEmbed exch ++ } ifelse + } + /NeverEmbed +- { dup length 0 gt +- { dup 0 get false eq +- { dup length 1 sub 1 exch getinterval exch pop /~NeverEmbed exch +- } if +- } if ++ { dup length 0 gt ++ { dup 0 get type /booleantype eq } { false } ifelse ++ { dup 0 get ++ { dup length 1 sub 1 exch getinterval ++ } ++ { dup length 1 sub 1 exch getinterval exch pop /~NeverEmbed exch ++ } ifelse ++ } ++ { exch pop /.NeverEmbed exch ++ } ifelse + } + /CannotEmbedFontPolicy { } + /EmbedAllFonts { } +diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps +--- a/Resource/Init/gs_res.ps ++++ b/Resource/Init/gs_res.ps +@@ -349,6 +349,15 @@ ne { + } if + pop pop + ++pssystemparams dup /GenericResourceDir get exch /GenericResourcePathSep get ++(Init) exch (gs_init.ps) concatstrings concatstrings concatstrings ++status { ++ pop pop pop pop ++} { ++ (\n*** Warning: GenericResourceDir doesn't point to a valid resource directory.) = ++ ( the -sGenericResourceDir=... option can be used to set this.\n) = ++} ifelse ++ + % Define the generic algorithm for computing resource file names. + /.rfnstring 8192 string def + /.genericrfn % <key> <scratch> <prefix> .genericrfn <filename> +diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps +--- a/Resource/Init/gs_setpd.ps ++++ b/Resource/Init/gs_setpd.ps +@@ -171,13 +171,8 @@ level2dict begin + % the default policy to "7" (impose) to avoid numerous problems with + % printing within CUPS... + % +- NOMEDIAATTRS { +- /PolicyNotFound 7 +- /PageSize 7 +- } { +- /PolicyNotFound 1 +- /PageSize 0 +- } ifelse ++ /PageSize NOMEDIAATTRS { 7 } { 0 } ifelse ++ /PolicyNotFound 1 + /PolicyReport { + dup /.LockSafetyParams known { + % Only possible error is invalidaccess +@@ -810,20 +805,17 @@ SETPDDEBUG { (Installing.) = pstack flush } if + % NB: This shoud be the only use of the .setuseciecolor + % operator anywhere. + % +- % If UseCIEColor is transitioned to false, set some +- % color space other than /DeviceGray, to insure that +- % initgraphics will actually perform a setcolorspace ++ % Set some color space other than /DeviceGray, to insure ++ % that initgraphics will actually perform a setcolorspace + % operation (there is an optimization in setcolorspace + % that does nothing if the operand and current color +- % spaces are the same, and UseCIEColor is false). ++ % spaces are the same) + + /.setuseciecolor where + { + pop 1 index /UseCIEColor .knownget + { +- dup .setuseciecolor not +- { /DeviceRGB setcolorspace } +- if ++ .setuseciecolor /DeviceRGB setcolorspace + } + if + } +diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps +--- a/Resource/Init/gs_statd.ps ++++ b/Resource/Init/gs_statd.ps +@@ -109,6 +109,8 @@ STRICT { (%END SIZES) .skipeof } if + /halfletter {396 612 //.setpagesize exec} bind def + % minimum of a4 and letter (a4 width, letter length) + /pa4 {595 792 //.setpagesize exec} bind def ++ % Japanese postcard size, 100mm x 148mm ++ /hagaki {283 420 //.setpagesize exec} bind def + % /tabloid {792 1224 //.setpagesize exec} bind def % 11x17 portrait + % /csheet {1224 1584 //.setpagesize exec} bind def % ANSI C 17x22 + % /dsheet {1584 2448 //.setpagesize exec} bind def % ANSI D 22x34 +@@ -134,7 +136,7 @@ STRICT { (%END SIZES) .skipeof } if + /flsa /flse /halfletter + /isob0 /isob1 /isob2 /isob3 /isob4 /isob5 /isob6 + /jisb0 /jisb1 /jisb2 /jisb3 /jisb4 /jisb5 /jisb6 +- /pa4 ++ /pa4 /hagaki + %END SIZES + ] cvlit readonly def + +diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps +--- a/Resource/Init/gs_ttf.ps ++++ b/Resource/Init/gs_ttf.ps +@@ -827,7 +827,8 @@ end readonly def % .loadttfontdict + } if + /ttc_offset 0 def + } ifelse +- /tables f offsets 4 getu16 16 mul string readstring pop def ++ % Peek because table counter may be incorrect. ++ /tables f offsets 4 getu16 16 mul string .peekstring pop def + /tabdict tables length 16 idiv dict def + % tabs = tables we want to keep, sorted by file position. + /tabs [ 0 16 tables length 1 sub { +@@ -868,7 +869,7 @@ mark + % Read data. Updates offsets, tabs; stores data in tabdict. + /.readttdata { + /file_table_pos 10 dict def +- /fpos offsets length tables length add ttc_offset add def ++ /fpos offsets length ttc_offset add def + /sfpos offsets length tabs length 16 mul add def + offsets 4 tabs length putu16 + tabs { +diff --git a/Resource/Init/gs_typ32.ps b/Resource/Init/gs_typ32.ps +--- a/Resource/Init/gs_typ32.ps ++++ b/Resource/Init/gs_typ32.ps +@@ -37,7 +37,8 @@ systemdict /.makeglyph32 .undef + % Define a string large enough to hold the metrics, + % an uncompressed bitmap (worst case = 5x expansion), + % and the 2 RTC codes (3 bytes). +- dup length 4 index length 5 mul add 10 add string ++ dup length 4 index length 5 mul add 10 add ++ 65535 .min string + % Stack: metrics bitmap cid font metstr buffer + dup 0 3 index putinterval + dup 2 index length 1 index length 1 index sub getinterval +diff --git a/Resource/Init/opdfread.ps b/Resource/Init/opdfread.ps +--- a/Resource/Init/opdfread.ps ++++ b/Resource/Init/opdfread.ps +@@ -152,6 +152,7 @@ end % A dictionary for local binding + /TTFDEBUG DefaultSwitch + /RotatePages DefaultSwitch + /FitPages DefaultSwitch ++/CenterPages DefaultSwitch + /SetPageSize DefaultSwitch + + /error % mark <object> .... error - +@@ -167,10 +168,16 @@ end % A dictionary for local binding + } bind def + + //SetPageSize { +- //RotatePages //FitPages or { +- mark (/RotatePages, /FitPages are not allowed with /SetPageSize) //error exec ++ //RotatePages //FitPages or //CenterPages or{ ++ mark (/RotatePages, /FitPages and CenterPages are not allowed with /SetPageSize) //error exec + } if +-} if ++} ++{ ++ //FitPages //CenterPages and { ++ mark (CenterPages is not allowed with /FitPages) //error exec ++ } if ++} ++ifelse + + % ===================== Utilities ========================================= + +@@ -851,23 +858,43 @@ currentdict end readonly def + } { + false + } ifelse +- { //FitPages { +- 1 index 5 index div 1 index 7 index div % bw bh px0 py0 pw ph sx sy +- 2 copy gt { +- exch ++ { //CenterPages { ++ //PDFR_DEBUG { ++ (Rotating page, and then centering it) == ++ } if ++ 90 rotate ++ 0 5 index neg translate ++ 5 index 1 index exch sub 2 div ++ 2 index 6 index sub 2 div neg % bw bh px0 py0 pw ph lm bm ++ translate ++ } { ++ //FitPages { ++ 1 index 5 index div 1 index 7 index div % bw bh px0 py0 pw ph sx sy ++ 2 copy gt { ++ exch ++ } if ++ pop dup scale % bw bh px0 py0 pw ph + } if +- pop dup scale % bw bh px0 py0 pw ph +- } if +- 90 rotate +- 0 5 index neg translate ++ 90 rotate ++ 0 5 index neg translate ++ } ifelse + } { +- //FitPages { +- 1 index 6 index div 1 index 6 index div % bw bh px0 py0 pw ph sx sy +- 2 copy gt { +- exch ++ //CenterPages { ++ //PDFR_DEBUG { ++ (Ccentering page) == ++ } if ++ 1 index 6 index sub 2 div ++ 1 index 6 index sub 2 div % bw bh px0 py0 pw ph lm bm ++ translate ++ } { ++ //FitPages { ++ 1 index 6 index div 1 index 6 index div % bw bh px0 py0 pw ph sx sy ++ 2 copy gt { ++ exch ++ } if ++ pop dup scale % bw bh px0 py0 pw ph + } if +- pop dup scale % bw bh px0 py0 pw ph +- } if ++ } ifelse + } ifelse + pop pop % bw bh px0 py0 + translate % bw bh +diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps +--- a/Resource/Init/pdf_base.ps ++++ b/Resource/Init/pdf_base.ps +@@ -720,6 +720,10 @@ currentdict /no_debug_dict undef + ( **** Operator 'endobj' is misspelled as 'endjobj'.\n) pdfformaterror + endobj exit + } bind ++ /enbobj { % Bug 690397. ++ ( **** Operator 'endobj' is misspelled as 'enbobj'.\n) pdfformaterror ++ endobj exit ++ } bind + % OmniForm generates PDF file with endobj missing in some + % objects. AR ignores this. So we have to do it too. + /obj { pop pop endobj exit } bind +diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps +--- a/Resource/Init/pdf_draw.ps ++++ b/Resource/Init/pdf_draw.ps +@@ -397,16 +397,20 @@ end + % Stack: mark ... smaskdict + dup /BC knownoget { + dup /Background exch 4 2 roll +- gsave ++ gsave //nodict begin + 1 index /G oget /Group oget /CS knownoget { + resolvecolorspace dup setgcolorspace csput + } if + aload pop setcolor [ currentgray ] +- grestore ++ end grestore + /GrayBackground exch 3 2 roll + } if + dup /TR knownoget { +- resolveidfnproc /TransferFunction exch 3 2 roll ++ dup /Identity eq { ++ pop ++ } { ++ resolvefnproc /TransferFunction exch 3 2 roll ++ } ifelse + } if + dup /G oget dup /BBox oget /BBox exch 4 2 roll + /.execmaskgroup cvx 2 packedarray cvx /Draw exch 3 2 roll +@@ -414,16 +418,44 @@ end + } ifelse SMask + } bdef + ++% Functions specific to the Device* colorspaces to force the switch to ++% the Device* colorspace so that the SMask will not get a CIEBased* colorspace ++% in the case when UseCIEColor changes the Device* colorspace to something else. ++% Also see the logic in pdf_main.ps:pdfopen that similarly defines these resources. ++/forceDefaultCS << ++ { ++ currentcolorspace setcolorspace % this will switch to Device colorspace ++ } bind ++ /DeviceGray exch ++ /DeviceRGB 1 index ++ /DeviceCMYK 1 index ++>> ++def ++ + % This procedure is called to actually render the soft mask. + /.execmaskgroup { % <masknum> <paramdict> <formdict> .execmaskgroup - +- % Save our place in PDFfile, and do a gsave to avoid resetting +- % the color space. +- currentcolorspace 4 1 roll ++ % Save our place in PDFfile. Do not use gsave-grestore when creating ++ % a soft mask with .begintransparencygroup because high level devices ++ % need to modify the graphic state by storing the soft mask ID. ++ % Save the ExtGState (//nodict begin) BEFORE changing the colorspace ++ mark currentcolor counttomark dup 4 add exch roll pop ++ currentcolorspace 4 1 roll .getuseciecolor 4 1 roll //nodict begin + PDFfile fileposition 4 1 roll + % We have to select the group's color space so that the + % background color will be interpreted correctly. +- dup /Group oget /CS knownoget { resolvecolorspace dup setgcolorspace csput } if +- exch dup /BBox get aload pop .begintransparencymaskgroup { ++ % [save/restore]DefaultCS make sure that the SMask logic sees ++ % the Device* spaces, not CIEBased* that UseCIEColor may have ++ % established. ++ false .setuseciecolor % SMask gets processed without UseCIEColor ++ dup /Group oget /CS knownoget { ++ resolvecolorspace dup setgcolorspace csput ++ //true % use currentcolorspace ++ } { ++ % inheriting the colorspace -- make sure Device* spaces are not CIEBased ++ forceDefaultCS currentcolorspace 0 get .knownget { exec } if ++ //false % no defined colorspace ++ } ifelse ++ 3 -1 roll dup /BBox get aload pop .begintransparencymaskgroup { + dup /Resources knownoget { oforce } { 0 dict } ifelse + exch false resolvestream + .execgroup .endtransparencymask +@@ -431,12 +463,12 @@ end + .discardtransparencymask stop + } if + PDFfile exch setfileposition +- setcolorspace ++ .setuseciecolor setcolorspace setcolor end % restore colorspace, color and ExtGState (end) + } bdef + % Paint a Form+Group XObject, either for a transparency mask or for a Do. + /.execgroup { % <resdict> <stream> .execgroup - + gsave //nodict begin +- null SMask ++ newpath null SMask + 1 .setopacityalpha 1 .setshapealpha + /Compatible .setblendmode + % Execute the body of the Form, similar to DoForm. +@@ -773,7 +805,7 @@ currentdict end readonly def + exch //false resolvestream pdfopdict .pdfruncontext + + countdictstack exch sub dup 0 gt { +- ( **** Warning: Pattern stream has imbalanced q/Q operators (too many q's)\n) ++ ( **** Warning: Pattern stream has unbalanced q/Q operators \(too many q's\)\n) + pdfformaterror + { Q } repeat + } { +@@ -796,16 +828,18 @@ currentdict end readonly def + 1 index /File get dup fileposition 3 1 roll + % Stack: dict savepos pos file + dup 3 -1 roll setfileposition +- dup 3 index /Length oget +- +- dup 65535 le { +- dup 0 eq { +- pop pop () ++ dup 3 index /Length knownoget { ++ dup 65535 le { ++ dup 0 eq { ++ pop pop () ++ } { ++ string readstring pop ++ } ifelse + } { +- string readstring pop ++ () /SubFileDecode filter /ReusableStreamDecode filter + } ifelse + } { +- () /SubFileDecode filter /ReusableStreamDecode filter ++ 0 (endstream) /SubFileDecode filter /ReusableStreamDecode filter + } ifelse + % Stack: dict savepos file string + 3 1 roll exch setfileposition +@@ -820,6 +854,7 @@ currentdict end readonly def + 2 index /Resources knownoget { oforce } { 0 dict } ifelse + /.pdfpaintproc cvx + ] cvx put ++ dup /.pattern_uses_transparency 1 index patternusestransparency put + PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { true } ifelse { (%Pattern: ) print dup === flush } if } if + } bdef + +@@ -1108,24 +1143,41 @@ end + } bdef + + /doimagesmask { % <imagemask> doimagesmask - +- PDFusingtransparency { currentdict /SMask knownoget } { false } ifelse { +- .begintransparencymaskimage +- PDFfile fileposition exch +- gsave //nodict begin +- null /SoftMask gput +- 1 .setopacityalpha 1 .setshapealpha +- /Compatible .setblendmode +- DoImage +- end grestore +- PDFfile exch setfileposition +- 0 .endtransparencymask ++ PDFusingtransparency { ++ currentdict /SMask knownoget ++ } { ++ false ++ } ifelse ++ { % We are doing transparency and SMask is present in the image ++ % stack: <imagemask> <SMask> ++ currentdevice .devicename /pdfwrite eq { ++ pop % pdfwrite will process SMask directly during 'doimage' ++ } { ++ .begintransparencymaskimage ++ PDFfile fileposition exch ++ gsave //nodict begin ++ null /SoftMask gput ++ 1 .setopacityalpha 1 .setshapealpha ++ /Compatible .setblendmode ++ DoImage ++ end grestore ++ PDFfile exch setfileposition ++ 0 .endtransparencymask ++ } ifelse + << /Subtype /Group /Isolated true + /.image_with_SMask true % pdfwrite needs : see gs/src/ztrans.c, gs/src/gdevpdft.c + >> 0 0 1 1 .begintransparencygroup + doimage + .endtransparencygroup + } { +- doimage ++ SoftMask //null ne { ++ % the image doesn't have an SMask, but the ExtGState does, force a group. ++ << /Subtype /Group /Isolated true >> 0 0 1 1 .begintransparencygroup ++ doimage ++ .endtransparencygroup ++ } ++ { doimage } ++ ifelse + } ifelse + } bdef + +@@ -1164,9 +1216,7 @@ end + % which is done under a rush of 8.63 release. + % The purpose is to disable a conversion of an image with soft mask + % into a Type 103 image, which currently allocates a full mask buffer +- % before writing clist. Note that imagemask installs +- % the transparency mask anyway (likely another bug), +- % so the image is still masked. ++ % before writing clist. + % With this workaround the Matte color is not working (ignored). + is_big_mask not + } { +@@ -1226,11 +1276,17 @@ end + /.paintform cvx + ] cvx /PaintProc exch put + % Adjust pdfemptycount since we have an extra dictionary on the stack +- pdfemptycount exch +- /pdfemptycount where pop count 2 sub /pdfemptycount exch put +- q execform Q % gsave / grestore around the Form ++ pdfemptycount countdictstack 3 -1 roll ++ /pdfemptycount count 1 sub store ++ q execform % gsave / grestore around the Form + % Restore pdfemptycount +- /pdfemptycount where pop exch /pdfemptycount exch put ++ countdictstack exch sub ++ dup 1 gt { ++ ( **** Warning: Pattern stream has unbalanced q/Q operators \(too many q's\)\n) ++ pdfformaterror ++ } if ++ { Q } repeat ++ /pdfemptycount exch store + } bdef + + /_dops_save 1 array def +@@ -1298,6 +1354,8 @@ end + oforce //unabbrevtypedict 1 index type .knownget { exec } if + } bdef + ++/is_space_dict << 0 0 9 9 10 10 12 12 13 13 32 32 >> readonly def ++ + drawopdict begin + /BI { mark } bdef + /ID { +@@ -1314,23 +1372,34 @@ drawopdict begin + % between the last byte of valid data and an EOL. + % Some files (PDFOUT v3.8d by GenText) have EI immediately following + % the stream. Some have no EOL and garbage bytes. +- % Therefore, we skip all bytes before EI or EOL +- 0 +- { PDFsource read not { //true exit } if +- dup 10 eq 1 index 13 eq or +- { pop PDFsource token pop /EI ne exit +- } +- if +- exch 69 eq 1 index 73 eq and { //false exit } if % 'EI' +- } +- loop +- exch pop +- { /ID cvx /syntaxerror signalerror +- } +- if ++ % Sometimes (bug 690300) CCITTDecode filter consumes 'E' in 'EI'. ++ % Therefore, we search for <start>I<sp|end> or <start|sp>EI<sp|end> ++ PDFsource read not { ++ /ID cvx /syntaxerror signalerror ++ } if ++ dup 73 eq { ++ pop 10 69 73 % Seed to: <sp>EI ++ } { ++ 10 10 3 -1 roll % Seed to: <sp><sp><any> ++ } ifelse ++ { PDFsource read not dup { 10 exch } if ++ //is_space_dict 2 index known ++ 3 index 73 eq and 4 index 69 eq and ++ //is_space_dict 6 index known and { ++ pop pop pop pop pop exit ++ } { ++ { ++ pop pop pop /ID cvx /syntaxerror signalerror ++ } { ++ 4 -1 roll pop ++ } ifelse ++ } ifelse ++ } loop + } bdef + end + ++currentdict /is_space_dict undef ++ + % ================================ Text ================================ % + + drawopdict begin +@@ -1401,38 +1470,42 @@ end + /drawborder { % <annot> drawborder - + gsave + dup /BS known 1 index /Border known or { +- dup /BS knownoget { ++ dup /BS knownoget { + dup type /dicttype ne % <annot> <border> <bad?> + } { + dup /Border oget +- dup type /arraytype ne % <annot> [border] <bad?> +- } ifelse +- { +- ( **** Warning: Wrong type of annotation border object.\n) ++ dup type /arraytype eq { ++ dup length 3 lt ++ } { ++ //true ++ } ifelse % <annot> [border] <bad?> ++ } ifelse { ++ ( **** Warning: Wrong annotation border object, no border is drawn.\n) + pdfformaterror ++ pop { 0 0 0 } + } if + dup type /dicttype eq { +- dup /W knownoget not { 1 } if ++ dup /W knownoget not { 1 } if + % Per PDF1.6 Reference table 8.13, /W in the border style dictionary is + % expressed in points (an absolute unit), so compensate here for any + % scaling of the PostScript user space done due to /UserUnit. + % Scaling due to -dPDFFitPage is not undone, to keep the correct border width + % compared to the size of the surrounding marks. +- //systemdict /NoUserUnit .knownget not { false } if not ++ //systemdict /NoUserUnit .knownget not { //false } if not + //systemdict /PDFFitPage known not and { % UserUnit is ignored if -dPDFFitPage + Page /UserUnit knownoget { div } if + } if +- [] 2 index /S knownoget { +- /D eq { 2 index /D knownoget not { [3] } if exch pop } if +- } if 3 -1 roll pop strokeborder +- } { ++ {} 2 index /S knownoget { ++ /D eq { 2 index /D knownoget not { {3} } if exch pop } if ++ } if 3 -1 roll pop strokeborder ++ } { + dup 2 get +- exch dup length 3 gt { 3 get } { pop [] } ifelse ++ exch dup length 3 gt { 3 get } { pop {} } ifelse + strokeborder + } ifelse +- } { +- 1 [] strokeborder +- } ifelse ++ } { ++ 1 {} strokeborder ++ } ifelse + grestore + } bdef + +diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps +--- a/Resource/Init/pdf_font.ps ++++ b/Resource/Init/pdf_font.ps +@@ -652,6 +652,11 @@ setglobal + % Yet another case of broken PDF's that Adobe Reader accepts. + 1 index dup /FontName known { + /FontName oget ++ dup type /nametype ne { ++ ( **** /FontName attribute in FontDescriptor is not a name.\n) ++ pdfformaterror ++ cvn ++ } if + } { + ( **** FontDescriptor missing required /FontName key. BaseFont name used.\n) + pdfformaterror +@@ -735,9 +740,43 @@ setglobal + % The whole type1 stream can be executed directly. There's no need to process + % Length1, 2, 3 keys. + +-/readtype1dict 5 dict dup begin ++/readtype1dict 10 dict dup begin + /definefont { + exch pop ++ ++ /topFontDict where { ++ { /FontType % in PLRM order ++ /FontMatrix ++ /FontName ++ /FontInfo ++ /WMode ++ /Encoding ++ /FontBBox ++ /UniqueID ++ /XUID ++ /PaintType ++ /StrokeWidth ++ /Metrics ++ /Metrics2 ++ /CDevProc ++ /CharStrings ++ /Private ++ /WeightVector ++ } { ++ 2 copy .knownget { ++ % Stack: font topFontDict /key val ++ 3 index 3 1 roll put ++ dup /MisplacedKey 0 put ++ } { ++ pop ++ } ifelse ++ } forall ++ /MisplacedKey known { ++ ( **** Warning: Type 1 font defines some of the keys in the external scope.\n) ++ pdfformaterror ++ } if ++ } if ++ + dup /UniqueID .knownget { + dup dup 0 lt exch 16#ffffff gt or { + ( **** Warning: Ignoring invalid /UniqueID = ) exch =string cvs +@@ -793,10 +832,31 @@ setglobal + pdfformaterror + } ifelse } .bind def + +- currentdict dup dup +- /undef_proc_warning undef +- /missing-type1-procs undef +- /readonly-op-dict undef ++ /prev_get /get load def ++ ++ /get { ++ dup /FontName eq { ++ % No warning, probably FontName is defined elsewhere; see definefont above. ++ .knownget not { /Missing } if ++ } { ++ dup /UniqueID eq { ++ % We don't want fonts to check /UniqueID and do 'restore'. ++ pop pop 16#FEDCBA98 % Arbitrary and invalid value ++ } { ++ prev_get ++ } ifelse ++ } ifelse ++ } bdef ++ ++ /prev_begin /begin load def ++ ++ /begin { ++ dup //systemdict eq { pop 0 dict } if ++ prev_begin ++ } bdef ++ ++ { /undef_proc_warning /missing-type1-procs /readonly-op-dict } ++ { currentdict exch undef } forall + + end readonly def + +@@ -1348,8 +1408,8 @@ currentdict /eexec_pdf_param_dict .undef + concatstrings concatstrings + cvn + QUIET not { +- (Substituting CID font resource ) print dup ==only +- ( for ) print 1 index ==only (.\n) print ++ (Substituting CID font ) print dup ==only ++ ( for ) print 1 index ==only (, see doc/Use.htm#CIDFontSubstitution.) = + } if + exch pop + dup /CIDFont resourcestatus { +@@ -1579,11 +1639,11 @@ currentdict /eexec_pdf_param_dict .undef + } 2 bndef + + <01000401> <01000402> <01000403> <01000404> % Type 1C +- <01000C02> ++ <01000C02> <01000C03> + { exch pop + dup /Subtype get + fontloadprocs exch get exec +- } 5 bndef ++ } 6 bndef + + <00010000> (true) (typ1) (ttcf) % TrueType OpenType + { exch pop readtruetype +@@ -1627,9 +1687,15 @@ currentdict /bndef undef + % /key res res desc stream + dup //null ne { + PDFfile fileposition +- 1 index //true resolvestream dup +- 4 string readstring pop +- exch closefile ++ mark { ++ 2 index //true resolvestream dup ++ 4 string readstring pop ++ exch closefile ++ } stopped { ++ cleartomark /bad_stream ++ } { ++ exch pop ++ } ifelse + PDFfile 3 -1 roll setfileposition + dup length 4 lt { pop /bad_stream } if + } { +diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps +--- a/Resource/Init/pdf_main.ps ++++ b/Resource/Init/pdf_main.ps +@@ -955,15 +955,22 @@ pdfdict begin + { Trailer /Root oget /Pages oget + dup /Count knownoget { + dup 0 le { +- pop ( **** Warning: Invalid Page count.\n) pdfformaterror +- % find the last page and use that as the Count +- 1 1 999999999 { +- dup pdffindpage? +- exch pop +- //null eq { exit } { pop } ifelse +- } for +- 1 sub % decrement to last page that we were able to find +- 2 copy /Count exch put ++ pop ++ dup /Kids knownoget { ++ pop ++ ( **** Warning: Invalid Page count.\n) pdfformaterror ++ % find the last page and use that as the Count ++ 1 1 999999999 { ++ dup pdffindpage? ++ exch pop ++ //null eq { exit } { pop } ifelse ++ } for ++ 1 sub % decrement to last page that we were able to find ++ 2 copy /Count exch put ++ } { ++ 0 % return 0 and keep 0 page count. ++ ( **** Warning: PDF document has no pages.\n) pdfformaterror ++ } ifelse + } if + exch pop + } { +@@ -1215,9 +1222,18 @@ end readonly def + /Link { + mark exch + dup /C knownoget { /Color exch 3 -1 roll } if +- { /Rect /Border } +- { 2 copy knownoget { 3 |
