Hi all,
I wandering if someone could shed some
light.
My application generates PDF files with embedded
TrueType fonts, and enables non-ASCII alphabets through Type0 fonts with
Identity-H encoding and Unicode-to-glyph-ID conversion. Everything works
great, Hebrew and Russian words display just fine, but copying/pasting these
words to other apps (such as MS Word) does not work...
So I attempted to add a ToUnicode entry to my Type0
fonts... Now the Reader completely disables highlighting of text, and spews out
the message "The encoding (CMap) specified by a font is corrupt". Here is what
it looks like:
7 0 obj
<</Type /Font
/Subtype /Type0
/BaseFont /Arial
/Encoding /Identity-H
/DescendantFonts [8 0 R]
/ToUnicode 12 0 R
>>
endobj
<</Type /Font
/Subtype /Type0
/BaseFont /Arial
/Encoding /Identity-H
/DescendantFonts [8 0 R]
/ToUnicode 12 0 R
>>
endobj
12 0 obj
<</Length 685
>>
stream
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0003> <0275>
endcodespacerange
2 beginbfrange
<0003> <0003> <0020>
<0011> <0011> <002e>
<0240> <0240> <0416>
<025a> <025a> <0430>
<025b> <025b> <0431>
<0262> <0262> <0438>
<0263> <0263> <0439>
<0264> <0264> <043a>
<0266> <0266> <043c>
<0268> <0268> <043e>
<0269> <0269> <043f>
<026a> <026a> <0440>
<026b> <026b> <0441>
<026c> <026c> <0442>
<026d> <026d> <0443>
<0271> <0271> <0447>
<0275> <0275> <044b>
endbfrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
endstream
endobj
<</Length 685
>>
stream
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0003> <0275>
endcodespacerange
2 beginbfrange
<0003> <0003> <0020>
<0011> <0011> <002e>
<0240> <0240> <0416>
<025a> <025a> <0430>
<025b> <025b> <0431>
<0262> <0262> <0438>
<0263> <0263> <0439>
<0264> <0264> <043a>
<0266> <0266> <043c>
<0268> <0268> <043e>
<0269> <0269> <043f>
<026a> <026a> <0440>
<026b> <026b> <0441>
<026c> <026c> <0442>
<026d> <026d> <0443>
<0271> <0271> <0447>
<0275> <0275> <044b>
endbfrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
endstream
endobj
(I currently have a separate entry for each
character in the text being displayed, will change it later to ranges). Can
anyone spot any abnormalities with this?
Thanks a lot in advance.
Peter
