Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
cmap [2020/02/23 13:37]
christian [Monster from the wild]
cmap [2020/02/23 14:26]
christian [Char to string mapping]
Line 127: Line 127:
  
 CMaps are not well defined. Therefore, there are some interesting variations of them in the wild. Here is a small selection of some issues. CMaps are not well defined. Therefore, there are some interesting variations of them in the wild. Here is a small selection of some issues.
-==== Mappings outside the codespace ====+==== Codespace problems ==== 
 + 
 +=== Wrong code length ===
  
 <code postscript> <code postscript>
Line 146: Line 148:
  
 This can be seen often. These illegal mappings are collected into the ''#unmapped'' variable of a Mappings object. This can be seen often. These illegal mappings are collected into the ''#unmapped'' variable of a Mappings object.
 +
 +=== Mappings outside the codespace ===
 +
 +<code postscript>
 +%...
 +1 begincodespacerange
 +<0001> <1004>
 +endcodespacerange
 +11 beginbfchar
 +<0003> <00A0>
 +<0005> <0022>
 +<0008> <0025>
 +<000F> <002C>
 +<0010> <00AD>
 +%...
 +</code>
 +
 +Here, only the first mapping matches the code space. All others fall outside of it, because the second byte has to be between <00> and <04>.
  
 ==== Wrong PostScript ==== ==== Wrong PostScript ====
Line 196: Line 216:
 </code> </code>
  
-It looks as if two codes (<24> and <50>) are mapped to a string of 2-byte characters. I have not found anything about this in the documenation. Seen in a PDF with the ''Producer'' "Mac OS X 10.7.1 Quartz PDFContext".+Two codes (<24> and <50>) are mapped to a string of 2-byte characters. This is defined by the PDF spec(({{pdf:pdf32000_2008.pdf|PDF specification (ISO standard PDF 32000-1:2008)}})) in section 9.10.3 "ToUnicode CMaps". This has not been implemented yet. 
 + 
 +Seen in a PDF with the ''Producer'' "Mac OS X 10.7.1 Quartz PDFContext".
  • cmap.txt
  • Last modified: 2020/02/23 14:33
  • by christian