Commit 28c55b98 authored by Jonas Smedegaard's avatar Jonas Smedegaard

New upstream version 9.22~~rc1~dfsg

parent 67271883
......@@ -26,6 +26,7 @@
BINDIR=./$(BUILDDIRPREFIX)bin
GLSRCDIR=@srcdir@/base
DEVSRCDIR=@srcdir@/devices
GENORDERED_SRCDIR=@srcdir@/toolbin/halftone/gen_ordered
GLGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
GLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
DEVGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
......@@ -460,7 +461,7 @@ XPS_LDFLAGS_SO=@XPS_DYNAMIC_LDFLAGS@
# (Libraries required by individual drivers are handled automatically.)
EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @EXPAT_LIBS@
AUXEXTRALIBS=@AUXEXTRALIBS@
AUXEXTRALIBS=@AUXEXTRALIBS@ @AUX_SHARED_ZLIB@
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
......@@ -530,7 +531,7 @@ SO_LIB_VERSION_SEPARATOR=@SO_LIB_VERSION_SEPARATOR@
# if it's included, $(PSD)gs_pdfwr.dev should always be one of the last in the list
PSI_FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)epsf.dev $(PSD)ttfont.dev \
@UTF8DEVS@ $(PSD)fapi_ps.dev $(PSD)jpx.dev $(PSD)rasterop.dev $(PSD)jbig2.dev $(PSD)gs_pdfwr.dev
@UTF8DEVS@ $(PSD)fapi_ps.dev $(PSD)jpx.dev $(PSD)jbig2.dev $(PSD)gs_pdfwr.dev
PCL_FEATURE_DEVS=$(PLOBJDIR)/pl.dev $(PLOBJDIR)/pjl.dev $(PXLOBJDIR)/pxl.dev $(PCL5OBJDIR)/pcl5c.dev \
......@@ -546,9 +547,9 @@ FEATURE_DEVS=$(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(GLD)psl3lib.dev
$(GLD)sjbig2.dev $(GLD)sjpx.dev $(GLD)ramfs.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(GLD)pipe.dev
# The following is strictly for testing.
FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev @JBIG2DEVS@ @JPXDEVS@ @UTF8DEVS@ $(GLD)ramfs.dev
FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev @JBIG2DEVS@ @JPXDEVS@ @UTF8DEVS@ $(GLD)ramfs.dev
#FEATURE_DEVS=$(FEATURE_DEVS_ALL)
# The list of resources to be included in the %rom% file system.
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -94,13 +94,13 @@
/Courier /NimbusMonoPS-Regular ;
/Courier-Oblique /NimbusMonoPS-Italic ;
/Helvetica-Bold /NimbusSans-Bold ;
/Helvetica-BoldOblique /NimbusSans-BoldOblique ;
/Helvetica-BoldOblique /NimbusSans-BoldItalic ;
/Helvetica-Narrow-Bold /NimbusSansNarrow-Bold ;
/Helvetica-Narrow-BoldOblique /NimbusSansNarrow-BdOblique ;
/Helvetica-Narrow /NimbusSansNarrow-Regular ;
/Helvetica-Narrow-Oblique /NimbusSansNarrow-Oblique ;
/Helvetica /NimbusSans-Regular ;
/Helvetica-Oblique /NimbusSans-Oblique ;
/Helvetica-Oblique /NimbusSans-Italic ;
/NewCenturySchlbk-Bold /C059-Bold ;
/NewCenturySchlbk-BoldItalic /C059-BdIta ;
/NewCenturySchlbk-Italic /C059-Italic ;
......
......@@ -21,7 +21,7 @@ currentglobal //true setglobal
/serialnumber dup {233640} readonly .makeoperator put % match CPSI 3017.102 Tek shows serialnumber 1401788461
systemdict /deviceinfo undef % for CET 20-23-1
% /UNROLLFORMS true put % CET files do unreasonable things inside forms
} superexec
} 1183615869 internaldict /superexec get exec
/UNROLLFORMS true def
......
......@@ -55,8 +55,7 @@ level2dict begin
{ //SharedFontDirectory }
{ /LocalFontDirectory .systemvar } % can't embed ref to local VM
ifelse .forceput pop % LocalFontDirectory is local, systemdict is global
} .bind odef % must bind .forceput and .setglobal
% even if NOBIND in effect
} .bind odef
% Don't just copy (load) the definition of .setglobal:
% it gets redefined for LL3.
/setshared { /.setglobal .systemvar exec } odef
......@@ -86,7 +85,7 @@ level2dict begin
% definition, copy it into the local directory.
//systemdict /SharedFontDirectory .knownget
{ 1 index .knownget
{ .FontDirectory 2 index 3 -1 roll { put } //superexec } % readonly
{ .FontDirectory 2 index 3 -1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly
if
}
if
......@@ -102,7 +101,7 @@ level2dict begin
% Furthermore, if FAKEFONTS is in effect, we want global real fonts to
% override fake local ones. We handle this by brute force.
/restore % <save> restore -
{ dup //restore % bind even if NOBIND
{ dup //restore
/LocalFontDirectory .systemvar
FAKEFONTS
{ mark
......
......@@ -519,11 +519,11 @@ buildfontdict 3 /.buildfont3 cvx put
% the font in LocalFontDirectory.
.currentglobal
{ //systemdict /LocalFontDirectory .knownget
{ 2 index 2 index { .growput } //superexec } % readonly
{ 2 index 2 index { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly
if
}
if
dup .FontDirectory 4 -2 roll { .growput } //superexec % readonly
dup .FontDirectory 4 -2 roll { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
% If the font originated as a resource, register it.
currentfile .currentresourcefile eq { dup .registerfont } if
readonly
......@@ -1193,7 +1193,7 @@ currentdict /.putgstringcopy .undef
.FontDirectory 1 index known not {
2 dict dup /FontName 3 index put
dup /FontType 1 put
.FontDirectory 3 1 roll { put } //superexec % readonly
.FontDirectory 3 1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
} {
pop
} ifelse
......
......@@ -746,119 +746,4 @@ if
end % img_utils_dict
% Conditionally turn image interpolation on or off.
% INTERPOLATE is not yet set, handle all cases
currentdict /INTERPOLATE known
currentdict /DOTERPOLATE known or
currentdict /NOTERPOLATE known or not {
currentfile 1 (%END INTERPOLATE) .subfiledecode flushfile
} if
/.interpolate {
dup /Interpolate .knownget not { //false } if
/INTERPOLATE .systemvar ne {
dup gcheck .currentglobal exch .setglobal
exch dup length dict copy
dup /Interpolate /INTERPOLATE .systemvar put
exch .setglobal
} if
} .bind odef
/colorimage
{ /INTERPOLATE .systemvar
{ .currentglobal % w h bit [] {}...{} multi ncomp glob
//false .setglobal
9 dict begin % w h bit [] {}...{} multi ncomp glob
2 .argindex { 1 index 7 add } { 8 } ifelse
dup .argindex pop % check # of arguments
copy gsave pop % preserve the arguments
{ 0 /DeviceGray 0 /DeviceRGB /DeviceCMYK }
1 index get setcolorspace % ... glob w h bit [] {}...{} multi ncomp
{0 1 0 1 0 1 0 1}
1 index 2 mul 0 exch % ... glob w h bit [] {}...{} multi ncomp {0 1 ...} 0 2*ncomp
getinterval /Decode exch def % ... glob w h bit [] {}...{} multi ncomp
exch dup % ... glob w h bit [] {}...{} ncomp multi multi
/MultipleDataSources exch def % ... glob w h bit [] {}...{} ncomp multi
{ array astore} { pop } ifelse % ... glob w h bit [] [{}...{}]
/DataSource exch def % ... glob w h bit []
/ImageMatrix exch def % ... glob w h bit
/BitsPerComponent exch def % ... glob w h
/Height exch def % ... glob w
/Width exch def % ... glob
/ImageType 1 def
/Interpolate //true def
.setglobal currentdict end % ... <<>>
image grestore
exch { 4 add } { 6 } ifelse
{ pop } repeat % -
}
{ colorimage
}
ifelse
} .bind odef
/image
{ dup type /dicttype eq
{ dup /ImageType get 3 eq
{ .currentglobal //false .setglobal exch
dup length dict copy begin .setglobal
/DataDict DataDict .interpolate def
/MaskDict MaskDict .interpolate def
currentdict end
}
{ .interpolate
}
ifelse
image
}
{ /INTERPOLATE .systemvar
{ 4 .argindex pop % check # of args
.currentglobal //false .setglobal
8 dict begin .setglobal
/ImageType 1 def
/DataSource 1 index def
/ImageMatrix 2 index def
/BitsPerComponent 3 index def
/Decode {0 1} def
/Height 4 index def
/Width 5 index def
/Interpolate //true def
currentdict end
gsave /DeviceGray setcolorspace image grestore
5 { pop } repeat
}
{ image
}
ifelse
}
ifelse
} .bind odef
/imagemask {
dup type /dicttype eq {
.interpolate imagemask
} {
/INTERPOLATE .systemvar {
4 .argindex pop % check # of args
.currentglobal //false .setglobal
8 dict begin .setglobal
/ImageType 1 def
/DataSource 1 index def
/ImageMatrix 2 index def
/BitsPerComponent 1 def
2 index { {1 0} } { {0 1} } ifelse /Decode exch def
/Height 4 index def
/Width 5 index def
/Interpolate //true def
currentdict end imagemask 5 { pop } repeat
} {
imagemask
} ifelse
} ifelse
} .bind odef
currentdict /.interpolate .undef
%END INTERPOLATE
.setglobal % restore VM mode
This diff is collapsed.
......@@ -58,7 +58,7 @@ languagelevel dup 2 .max .setlanguagelevel
/.bind /.bind_ load odef % note that .bind_ will get bound
currentdict /.bindscratch .undef
DELAYBIND NOBIND or not {
DELAYBIND not {
% We can't just do
% /bind /.bind load def
% because then /bind load == prints --.bind-- .
......
......@@ -59,7 +59,7 @@ statusdict begin
% shrunk by 25 units on all 4 sides.
/note /letter load def
% End of Adobe-defined page sizes
STRICT { (%END SIZES) .skipeof } if
% Other page sizes
% ISO standard paper sizes
/a0 {2384 3370 //.setpagesize exec} bind def
......
......@@ -435,7 +435,7 @@ currentdict /woff_tag_dict .undef
} bind def
% Each procedure in this dictionary is called as follows:
% <encodingtable> proc <glypharray>
% <encodingtable> proc <glyph dictionary>
/cmapformats mark
0 { % Apple standard 1-to-1 mapping.
6 256 getinterval_from_stringarray
......@@ -538,35 +538,20 @@ currentdict /woff_tag_dict .undef
/putglyph {
glyphs code 3 -1 roll put /code code 1 add def
} bind def
% Do a first pass to compute the size of the glyphs array.
/numcodes 0 def
/glyphs 0 dict def
0 0 2 nseg2 3 sub {
% Stack: /glyphs numglyphs i2
/i2 exch def
/scode startc i2 getu16a def
/ecode endc i2 getu16a def
% Bug 693538: More undocumented nonsense: in cases where scode == ecode,
% see Bug 691326 below *except*, it seems when both are zero
scode 0 eq ecode 0 eq and not {
scode ecode 1 add gt { % Bug 691326.
/ecode scode 1 add def % Acrobat does this contrary to TTF spec that
} if % requires such intervals to be ignored.
numcodes scode firstcode sub
% Hack for fonts that have only 0x0000 and 0xf000 ranges
%dup 16#e000 ge { 255 and } if
% the previous line is obstructive to CJK fonts, so it was removed
exch sub 0 .max ecode scode sub 1 add add
exch 1 index add exch
numcodes add /numcodes exch def
} if
} for pop
% Now fill in the array.
/numcodes 0 def /code 0 def
0 2 nseg2 3 sub {
% neg2 is number of segments x 2. A format 4 cmap, with usable
% mappings cannot (according to the spec) have only 1 segment,
% since format 4 requires a closing segment with start and end
% codes being 0xffff. Unfortunately, we have found badly subsetted
% TTF fonts which have one segment with valid mappings, and no
% closing segment.
% In such a case, force the loop to work as though as we have two
% segments - this works as we don't rely on the terminating segment
% but use the loop counter to spot completion - effrectively, we
% ignore the closing segment when it's present, anyway.
0 2 nseg2 dup 4 lt {pop 4}if 3 sub {
/i2 exch def
/scode startc i2 getu16a def
/ecode endc i2 getu16a def
......@@ -633,8 +618,8 @@ currentdict /woff_tag_dict .undef
} bind
.dicttomark readonly def % cmapformats
% <cmaptab> cmaparray <glypharray>
/cmaparray {
% <cmaptab> cmapdict <glyph dictionary>
/cmapdict {
dup 0 getu16a cmapformats exch .knownget {
TTFDEBUG {
(cmap: format ) print 1 index 0 getu16a = flush
......@@ -1389,7 +1374,7 @@ mark
def
} if
/cmapa cmaptab cmaparray def
/cmapa cmaptab cmapdict def
% Some badly designed Chinese fonts have a post table
% in which all glyphs other than 0 are named .null.
% Use CharStrings to keep track of the reverse map from
......@@ -1436,7 +1421,7 @@ mark
TTFDEBUG { (\n1 setting alias: ) print dup ==only
( to be the same as ) print 2 index //== exec } if
7 index 2 index 3 -1 roll exch //.growput superexec
7 index 2 index 3 -1 roll exch //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse
} forall
pop pop pop
}
......@@ -1454,7 +1439,7 @@ mark
exch pop
TTFDEBUG { (\n2 setting alias: ) print 1 index ==only
( to use glyph index: ) print dup //== exec } if
5 index 3 1 roll //.growput superexec
5 index 3 1 roll //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse
//false
}
{
......@@ -1471,7 +1456,7 @@ mark
{ % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer)
TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only
( to be index: ) print dup //== exec } if
exch pop 5 index 3 1 roll //.growput superexec
exch pop 5 index 3 1 roll //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse
}
{
pop pop
......@@ -1626,7 +1611,7 @@ currentdict /postalias undef
mark
.ttkeys
/NumGlyphs numloca
/TT_cmap cmaptab cmaparray
/TT_cmap cmaptab cmapdict
/file_table_pos file_table_pos
/Decoding Decoding
.dicttomark
......@@ -1645,7 +1630,7 @@ currentdict /postalias undef
mark
.ttkeys
/NumGlyphs numloca
/TT_cmap cmaptab cmaparray
/TT_cmap cmaptab cmapdict
% /file_table_pos file_table_pos
/Decoding Decoding
.dicttomark
......@@ -1767,9 +1752,8 @@ currentdict /postalias undef
% <chartoglyphmap> <subcmap> <AGL> .pdfmapchars /CharStrings <charstrings>
/.pdfmapchars {
exch cmaparray /cmapencoding exch def % c2g
exch cmapdict /cmapencoding exch def % c2g
/CharStrings 0 dict % c2g /CS <<>>
% Add glyphs of <AGL>*<subcmap> :
3 2 roll { % /CS <<>> v
dup type /arraytype eq { % /CS <<>> /name []
......@@ -1806,13 +1790,12 @@ currentdict /postalias undef
} forall
dup /.notdef 0 put
} bind def
% <subtable> .pdfmapsymbolic /Encoding [] /CharStrings <<>>
/.pdfmapsymbolic {
//true /.render_notdef gput
cmaparray
cmapdict
dup length 1 add dict begin
[ 64 { /.notdef /.notdef /.notdef /.notdef } repeat ]
exch { % [] char glyph
......@@ -1845,7 +1828,7 @@ currentdict /postalias undef
% The following algorithms are per the PDF 1.7 Reference.
TTFDEBUG { (.pdfcharkeys beg) = } if
% if the flags say symbolic, *and* the font contains a symbol
% if the flags say symbolic, *and* the font contains a symbol or UCS-2
% cmap table, ignore Encoding if there is one, treat as symbolic.
% If the flags say symbolic, and the font doesn't have a symbol cmap
% and we have an Encoding, treat it as non-symbolic
......@@ -1853,7 +1836,20 @@ currentdict /postalias undef
% Finally, if none of that works, remove the Encoding, and treat it
% as non-symbolic.
is_symbolic {
<00030000> .findcmap { //true } { prebuilt_encoding //null eq { <00010000> .findcmap}{//false}ifelse } ifelse {
<00030000> .findcmap
{ //true }
{
prebuilt_encoding //null eq {
<00030001> .findcmap
{//true}
{<00010000> .findcmap}
ifelse
}
{//false}
ifelse
} ifelse
{
.pdfmapsymbolic
/prebuilt_encoding //null def
//false
......
......@@ -116,7 +116,7 @@
{ % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname aglname
CFFDEBUG { (\nsetting alias: ) print dup ==only
( to be the same as glyph: ) print 1 index //== exec } if
3 index exch 3 index //.growput superexec
3 index exch 3 index //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse
% scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname
}
{pop} ifelse
......@@ -135,7 +135,7 @@
3 1 roll pop pop
} if
pop
dup /.AGLprocessed~GS //true //.growput superexec
dup /.AGLprocessed~GS //true //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse
} if
%% We need to excute the C .buildfont1 in a stopped context so that, if there
......
......@@ -774,6 +774,11 @@ currentdict /no_debug_dict undef
% When resolving an object reference, we stop at the endobj or endstream.
/resolveopdict mark
valueopdict { } forall
/xref { % Bug 697761
( **** Error: Encountered 'xref' while expecting 'endobj'.\n) pdfformaterror
( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror
endobj exit
} bind
/endstream { endobj exit } bind
/endobj { endobj exit } bind
/endjobj { % Bug 689876.
......@@ -786,9 +791,13 @@ currentdict /no_debug_dict undef
( Output may be incorrect.\n) pdfformaterror
endobj exit
} bind
/obj {
% 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
( **** Error: Encountered 'obj' while expecting 'endobj'.\n) pdfformaterror
( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror
pop pop endobj exit
} bind
.dicttomark readonly def
/resolveR { % <object#> <generation#> resolveR <object>
......@@ -849,12 +858,13 @@ currentdict /no_debug_dict undef
dup type /dicttype eq % For dictionaries only
{
dup /Type .knownget % make sure the dictionary has a type
dup /Type known % make sure the dictionary has a type
{
dup /Font eq exch /FontDescriptor eq or % and ensure its a Font or FontDescriptor
{dup 3 -1 roll /.gs.pdfobj# exch put}
{exch pop}
ifelse
%% We must not add to *all* dictionaries, because some of them are handled by
%% executing all the key/value pairs, and adding a integer causes problems
%% Since we only use this number for font identification, or checking self-references,
%% we only need it for dictionaries with a Type, and these are always handled more carefully.
dup 3 -1 roll /.gs.pdfobj# exch put
}
{exch pop}
ifelse
......@@ -889,11 +899,6 @@ currentdict /no_debug_dict undef
% may have preceded the EOL, such as spaces or tabs. Thus we back up one
% character and scan until we find the \n terminator.
/stream { % <dict> stream <modified_dict>
dup /Length knownoget {
0 eq {
dup /Filter undef % don't confuse any filters that require data
} if
} if
dup /F known dup PDFsource PDFfile eq or {
not {
dup /File PDFfile put
......
This diff is collapsed.
......@@ -268,7 +268,6 @@ currentdict /known_symbolic_fonts undef
/getfontmetrics { % <font-resource> <font> <Encoding|null> getfontmetrics
% <font-resource> <font> <Encoding|null>
% <Metrics|null> <GlyphMap|null>
2 index /Widths oknown {
dup //null eq { pop dup /Encoding get } if
7 dict begin
......@@ -871,7 +870,9 @@ setglobal