diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2000-06-28 01:36:30 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2000-06-28 01:36:30 +0000 |
commit | 317bb5a73d40cc536a18082d1b9030fb0b715be5 (patch) | |
tree | 694bfe63109a863350cf8e122d57eeb3f30ea906 | |
parent | 577a0657b1b086a78f26af0ca28073f1e437ffed (diff) | |
download | ghostpdl-317bb5a73d40cc536a18082d1b9030fb0b715be5.tar.gz |
Fix: The built-in Identity CMaps had an incorrect entry count for
begincodespacerange and begincidrange; these CMaps, and all Type 0 fonts,
were constructed in a way that was incompatible with some old Adobe font
loading software.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@532 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/lib/pdf_font.ps | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gs/lib/pdf_font.ps b/gs/lib/pdf_font.ps index cb29e707f..2b83dafcc 100644 --- a/gs/lib/pdf_font.ps +++ b/gs/lib/pdf_font.ps @@ -534,25 +534,25 @@ readonly def .currentglobal true .setglobal 3 1 roll /CIDInit /ProcSet findresource begin 12 dict begin + begincmap /WMode exch def /CMapName exch def - begincmap /CIDSystemInfo 3 dict dup begin /Registry (Adobe) def /Ordering (Japan1) def /Supplement 0 def end def - %/CMapName ... def + %/CMapName (see above) /CMapVersion 1 def /CMapType 1 def - %/WMode ... def + %WMode (see above) % The PDF documentation says that these CMaps map CIDs - % "1 to 65,536". We think this is a misprint for 0 to 65,535. - 2 begincodespacerange + % "1 to 65,536". This is a misprint for 0 to 65,535. + 1 begincodespacerange % <0001> <00ff> <0100> <ffff> <0000> <ffff> endcodespacerange - 2 begincidrange + 1 begincidrange % <0001> <00ff> 1 <0100> <ffff> 256 <0000> <ffff> 0 endcidrange @@ -564,31 +564,31 @@ readonly def exch .setglobal } bdef -/buildType0 % <Type0-font-resource> buildType0 <font> -{ 10 dict begin - /FontType 0 def - /FontMatrix 1 index /FontMatrix knownoget not { matrix } if def - /FontName 1 index /BaseFont get def - /FMapType 9 def - /Encoding [ - 0 1 4 index /DescendantFonts oget length 1 sub { } for - ] def - /FDepVector [ - 2 index /DescendantFonts oget { exec resourcefont } forall - ] def - /CMap 1 index /Encoding oget - dup type /nametype eq { - dup /CMap resourcestatus { +/buildType0 { % <Type0-font-resource> buildType0 <font> + dup /BaseFont get % FontName + 1 index /Encoding oget + dup type /nametype eq { + dup /CMap resourcestatus { pop pop /CMap findresource - } { + } { knownCMaps 1 index .knownget { exch pop exec } { /undefined signalerror } ifelse - } ifelse + } ifelse + } { + resolvestream + } ifelse % CMap + [ + 3 index /DescendantFonts oget { exec resourcefont } forall + ] % subfonts + composefont + % Stack: fontres font + 1 index /FontMatrix knownoget { + dup aload pop true {0 0 1 0 0 1} {3 -1 roll eq and} forall { + 1 index exch makefont exch /FontName get exch definefont } { - resolvestream + pop } ifelse - def - FontName currentdict end definefont exch pop + } if exch pop } bdef % ---------------- CIDFontType0/2 fonts ---------------- % |