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
Next revision Both sides next revision
cmap [2020/02/23 11:11]
christian [Prevent copying]
cmap [2020/02/23 11:17]
christian [Mappings outside the codespace]
Line 124: Line 124:
   * the mappings are ordered. This is not strictly prescribed, but recommended by the specifications.   * the mappings are ordered. This is not strictly prescribed, but recommended by the specifications.
  
-==== Handling malformed CMaps ==== 
- 
-Sometimes CMaps define mappings which are not covered by the codespace ranges. This can be seen very often in the wild. These illegal mappings are collected into the ''#unmapped'' variable of a Mappings object. 
 ===== Monster from the wild ===== ===== Monster from the wild =====
 +
  
 ==== Mappings outside the codespace ==== ==== Mappings outside the codespace ====
  
 single byte mappings in a double byte codespace single byte mappings in a double byte codespace
 +
 +Sometimes CMaps define mappings which are not covered by the codespace ranges. This can be seen very often in the wild. These illegal mappings are collected into the ''#unmapped'' variable of a Mappings object.
  
 ==== Wrong PostScript ==== ==== Wrong PostScript ====
Line 137: Line 137:
 using /find instead of /findresource  using /find instead of /findresource 
  
 +See [[postscript#exception_handling_example]]
 ==== Prevent copying ==== ==== Prevent copying ====
  
Line 163: Line 164:
 Here, all codes map to the same character (Substitute character, Ctrl-Z) to prevent extracting the text. Interesting is also the ordering by the second byte, which forced me to redesign the object structure to avoid exponential processing time. Here, all codes map to the same character (Substitute character, Ctrl-Z) to prevent extracting the text. Interesting is also the ordering by the second byte, which forced me to redesign the object structure to avoid exponential processing time.
  
-Seen in [[https://github.com/adobe-type-tools/Adobe-CNS1/Adobe-CNS1-7.pdf|The Adobe-CNS1-7 Character Collection]].+Seen in [[https://github.com/adobe-type-tools/Adobe-CNS1/raw/master/Adobe-CNS1-7.pdf|The Adobe-CNS1-7 Character Collection]].
 ==== Char to string mapping ==== ==== Char to string mapping ====
  
  • cmap.txt
  • Last modified: 2020/02/23 14:33
  • by christian