You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

447 lines
22 KiB

11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Pdf
  17. * @subpackage Fonts
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /** Zend_Pdf_Cmap */
  23. // require_once 'Zend/Pdf/Cmap.php';
  24. /**
  25. * Implements the "byte encoding" character map (type 0).
  26. *
  27. * This is the (legacy) Apple standard encoding mechanism and provides coverage
  28. * for characters in the Mac Roman character set only. Consequently, this cmap
  29. * type should be used only as a last resort.
  30. *
  31. * The mapping from Mac Roman to Unicode can be found at
  32. * {@link http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT}.
  33. *
  34. * @package Zend_Pdf
  35. * @subpackage Fonts
  36. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  37. * @license http://framework.zend.com/license/new-bsd New BSD License
  38. */
  39. class Zend_Pdf_Cmap_ByteEncoding extends Zend_Pdf_Cmap
  40. {
  41. /**** Instance Variables ****/
  42. /**
  43. * Glyph index array. Stores the actual glyph numbers. The array keys are
  44. * the translated Unicode code points.
  45. * @var array
  46. */
  47. protected $_glyphIndexArray = array();
  48. /**** Public Interface ****/
  49. /* Concrete Class Implementation */
  50. /**
  51. * Returns an array of glyph numbers corresponding to the Unicode characters.
  52. *
  53. * If a particular character doesn't exist in this font, the special 'missing
  54. * character glyph' will be substituted.
  55. *
  56. * See also {@link glyphNumberForCharacter()}.
  57. *
  58. * @param array $characterCodes Array of Unicode character codes (code points).
  59. * @return array Array of glyph numbers.
  60. */
  61. public function glyphNumbersForCharacters($characterCodes)
  62. {
  63. $glyphNumbers = array();
  64. foreach ($characterCodes as $key => $characterCode) {
  65. if (! isset($this->_glyphIndexArray[$characterCode])) {
  66. $glyphNumbers[$key] = Zend_Pdf_Cmap::MISSING_CHARACTER_GLYPH;
  67. continue;
  68. }
  69. $glyphNumbers[$key] = $this->_glyphIndexArray[$characterCode];
  70. }
  71. return $glyphNumbers;
  72. }
  73. /**
  74. * Returns the glyph number corresponding to the Unicode character.
  75. *
  76. * If a particular character doesn't exist in this font, the special 'missing
  77. * character glyph' will be substituted.
  78. *
  79. * See also {@link glyphNumbersForCharacters()} which is optimized for bulk
  80. * operations.
  81. *
  82. * @param integer $characterCode Unicode character code (code point).
  83. * @return integer Glyph number.
  84. */
  85. public function glyphNumberForCharacter($characterCode)
  86. {
  87. if (! isset($this->_glyphIndexArray[$characterCode])) {
  88. return Zend_Pdf_Cmap::MISSING_CHARACTER_GLYPH;
  89. }
  90. return $this->_glyphIndexArray[$characterCode];
  91. }
  92. /**
  93. * Returns an array containing the Unicode characters that have entries in
  94. * this character map.
  95. *
  96. * @return array Unicode character codes.
  97. */
  98. public function getCoveredCharacters()
  99. {
  100. return array_keys($this->_glyphIndexArray);
  101. }
  102. /**
  103. * Returns an array containing the glyphs numbers that have entries in this character map.
  104. * Keys are Unicode character codes (integers)
  105. *
  106. * This functionality is partially covered by glyphNumbersForCharacters(getCoveredCharacters())
  107. * call, but this method do it in more effective way (prepare complete list instead of searching
  108. * glyph for each character code).
  109. *
  110. * @internal
  111. * @return array Array representing <Unicode character code> => <glyph number> pairs.
  112. */
  113. public function getCoveredCharactersGlyphs()
  114. {
  115. return $this->_glyphIndexArray;
  116. }
  117. /* Object Lifecycle */
  118. /**
  119. * Object constructor
  120. *
  121. * Parses the raw binary table data. Throws an exception if the table is
  122. * malformed.
  123. *
  124. * @param string $cmapData Raw binary cmap table data.
  125. * @throws Zend_Pdf_Exception
  126. */
  127. public function __construct($cmapData)
  128. {
  129. /* Sanity check: This table must be exactly 262 bytes long.
  130. */
  131. $actualLength = strlen($cmapData);
  132. if ($actualLength != 262) {
  133. // require_once 'Zend/Pdf/Exception.php';
  134. throw new Zend_Pdf_Exception('Insufficient table data',
  135. Zend_Pdf_Exception::CMAP_TABLE_DATA_TOO_SMALL);
  136. }
  137. /* Sanity check: Make sure this is right data for this table type.
  138. */
  139. $type = $this->_extractUInt2($cmapData, 0);
  140. if ($type != Zend_Pdf_Cmap::TYPE_BYTE_ENCODING) {
  141. // require_once 'Zend/Pdf/Exception.php';
  142. throw new Zend_Pdf_Exception('Wrong cmap table type',
  143. Zend_Pdf_Exception::CMAP_WRONG_TABLE_TYPE);
  144. }
  145. $length = $this->_extractUInt2($cmapData, 2);
  146. if ($length != $actualLength) {
  147. // require_once 'Zend/Pdf/Exception.php';
  148. throw new Zend_Pdf_Exception("Table length ($length) does not match actual length ($actualLength)",
  149. Zend_Pdf_Exception::CMAP_WRONG_TABLE_LENGTH);
  150. }
  151. /* Mapping tables should be language-independent. The font may not work
  152. * as expected if they are not. Unfortunately, many font files in the
  153. * wild incorrectly record a language ID in this field, so we can't
  154. * call this a failure.
  155. */
  156. $language = $this->_extractUInt2($cmapData, 4);
  157. if ($language != 0) {
  158. // Record a warning here somehow?
  159. }
  160. /* The mapping between the Mac Roman and Unicode characters is static.
  161. * For simplicity, just put all 256 glyph indices into one array keyed
  162. * off the corresponding Unicode character.
  163. */
  164. $i = 6;
  165. $this->_glyphIndexArray[0x00] = ord($cmapData[$i++]);
  166. $this->_glyphIndexArray[0x01] = ord($cmapData[$i++]);
  167. $this->_glyphIndexArray[0x02] = ord($cmapData[$i++]);
  168. $this->_glyphIndexArray[0x03] = ord($cmapData[$i++]);
  169. $this->_glyphIndexArray[0x04] = ord($cmapData[$i++]);
  170. $this->_glyphIndexArray[0x05] = ord($cmapData[$i++]);
  171. $this->_glyphIndexArray[0x06] = ord($cmapData[$i++]);
  172. $this->_glyphIndexArray[0x07] = ord($cmapData[$i++]);
  173. $this->_glyphIndexArray[0x08] = ord($cmapData[$i++]);
  174. $this->_glyphIndexArray[0x09] = ord($cmapData[$i++]);
  175. $this->_glyphIndexArray[0x0a] = ord($cmapData[$i++]);
  176. $this->_glyphIndexArray[0x0b] = ord($cmapData[$i++]);
  177. $this->_glyphIndexArray[0x0c] = ord($cmapData[$i++]);
  178. $this->_glyphIndexArray[0x0d] = ord($cmapData[$i++]);
  179. $this->_glyphIndexArray[0x0e] = ord($cmapData[$i++]);
  180. $this->_glyphIndexArray[0x0f] = ord($cmapData[$i++]);
  181. $this->_glyphIndexArray[0x10] = ord($cmapData[$i++]);
  182. $this->_glyphIndexArray[0x11] = ord($cmapData[$i++]);
  183. $this->_glyphIndexArray[0x12] = ord($cmapData[$i++]);
  184. $this->_glyphIndexArray[0x13] = ord($cmapData[$i++]);
  185. $this->_glyphIndexArray[0x14] = ord($cmapData[$i++]);
  186. $this->_glyphIndexArray[0x15] = ord($cmapData[$i++]);
  187. $this->_glyphIndexArray[0x16] = ord($cmapData[$i++]);
  188. $this->_glyphIndexArray[0x17] = ord($cmapData[$i++]);
  189. $this->_glyphIndexArray[0x18] = ord($cmapData[$i++]);
  190. $this->_glyphIndexArray[0x19] = ord($cmapData[$i++]);
  191. $this->_glyphIndexArray[0x1a] = ord($cmapData[$i++]);
  192. $this->_glyphIndexArray[0x1b] = ord($cmapData[$i++]);
  193. $this->_glyphIndexArray[0x1c] = ord($cmapData[$i++]);
  194. $this->_glyphIndexArray[0x1d] = ord($cmapData[$i++]);
  195. $this->_glyphIndexArray[0x1e] = ord($cmapData[$i++]);
  196. $this->_glyphIndexArray[0x1f] = ord($cmapData[$i++]);
  197. $this->_glyphIndexArray[0x20] = ord($cmapData[$i++]);
  198. $this->_glyphIndexArray[0x21] = ord($cmapData[$i++]);
  199. $this->_glyphIndexArray[0x22] = ord($cmapData[$i++]);
  200. $this->_glyphIndexArray[0x23] = ord($cmapData[$i++]);
  201. $this->_glyphIndexArray[0x24] = ord($cmapData[$i++]);
  202. $this->_glyphIndexArray[0x25] = ord($cmapData[$i++]);
  203. $this->_glyphIndexArray[0x26] = ord($cmapData[$i++]);
  204. $this->_glyphIndexArray[0x27] = ord($cmapData[$i++]);
  205. $this->_glyphIndexArray[0x28] = ord($cmapData[$i++]);
  206. $this->_glyphIndexArray[0x29] = ord($cmapData[$i++]);
  207. $this->_glyphIndexArray[0x2a] = ord($cmapData[$i++]);
  208. $this->_glyphIndexArray[0x2b] = ord($cmapData[$i++]);
  209. $this->_glyphIndexArray[0x2c] = ord($cmapData[$i++]);
  210. $this->_glyphIndexArray[0x2d] = ord($cmapData[$i++]);
  211. $this->_glyphIndexArray[0x2e] = ord($cmapData[$i++]);
  212. $this->_glyphIndexArray[0x2f] = ord($cmapData[$i++]);
  213. $this->_glyphIndexArray[0x30] = ord($cmapData[$i++]);
  214. $this->_glyphIndexArray[0x31] = ord($cmapData[$i++]);
  215. $this->_glyphIndexArray[0x32] = ord($cmapData[$i++]);
  216. $this->_glyphIndexArray[0x33] = ord($cmapData[$i++]);
  217. $this->_glyphIndexArray[0x34] = ord($cmapData[$i++]);
  218. $this->_glyphIndexArray[0x35] = ord($cmapData[$i++]);
  219. $this->_glyphIndexArray[0x36] = ord($cmapData[$i++]);
  220. $this->_glyphIndexArray[0x37] = ord($cmapData[$i++]);
  221. $this->_glyphIndexArray[0x38] = ord($cmapData[$i++]);
  222. $this->_glyphIndexArray[0x39] = ord($cmapData[$i++]);
  223. $this->_glyphIndexArray[0x3a] = ord($cmapData[$i++]);
  224. $this->_glyphIndexArray[0x3b] = ord($cmapData[$i++]);
  225. $this->_glyphIndexArray[0x3c] = ord($cmapData[$i++]);
  226. $this->_glyphIndexArray[0x3d] = ord($cmapData[$i++]);
  227. $this->_glyphIndexArray[0x3e] = ord($cmapData[$i++]);
  228. $this->_glyphIndexArray[0x3f] = ord($cmapData[$i++]);
  229. $this->_glyphIndexArray[0x40] = ord($cmapData[$i++]);
  230. $this->_glyphIndexArray[0x41] = ord($cmapData[$i++]);
  231. $this->_glyphIndexArray[0x42] = ord($cmapData[$i++]);
  232. $this->_glyphIndexArray[0x43] = ord($cmapData[$i++]);
  233. $this->_glyphIndexArray[0x44] = ord($cmapData[$i++]);
  234. $this->_glyphIndexArray[0x45] = ord($cmapData[$i++]);
  235. $this->_glyphIndexArray[0x46] = ord($cmapData[$i++]);
  236. $this->_glyphIndexArray[0x47] = ord($cmapData[$i++]);
  237. $this->_glyphIndexArray[0x48] = ord($cmapData[$i++]);
  238. $this->_glyphIndexArray[0x49] = ord($cmapData[$i++]);
  239. $this->_glyphIndexArray[0x4a] = ord($cmapData[$i++]);
  240. $this->_glyphIndexArray[0x4b] = ord($cmapData[$i++]);
  241. $this->_glyphIndexArray[0x4c] = ord($cmapData[$i++]);
  242. $this->_glyphIndexArray[0x4d] = ord($cmapData[$i++]);
  243. $this->_glyphIndexArray[0x4e] = ord($cmapData[$i++]);
  244. $this->_glyphIndexArray[0x4f] = ord($cmapData[$i++]);
  245. $this->_glyphIndexArray[0x50] = ord($cmapData[$i++]);
  246. $this->_glyphIndexArray[0x51] = ord($cmapData[$i++]);
  247. $this->_glyphIndexArray[0x52] = ord($cmapData[$i++]);
  248. $this->_glyphIndexArray[0x53] = ord($cmapData[$i++]);
  249. $this->_glyphIndexArray[0x54] = ord($cmapData[$i++]);
  250. $this->_glyphIndexArray[0x55] = ord($cmapData[$i++]);
  251. $this->_glyphIndexArray[0x56] = ord($cmapData[$i++]);
  252. $this->_glyphIndexArray[0x57] = ord($cmapData[$i++]);
  253. $this->_glyphIndexArray[0x58] = ord($cmapData[$i++]);
  254. $this->_glyphIndexArray[0x59] = ord($cmapData[$i++]);
  255. $this->_glyphIndexArray[0x5a] = ord($cmapData[$i++]);
  256. $this->_glyphIndexArray[0x5b] = ord($cmapData[$i++]);
  257. $this->_glyphIndexArray[0x5c] = ord($cmapData[$i++]);
  258. $this->_glyphIndexArray[0x5d] = ord($cmapData[$i++]);
  259. $this->_glyphIndexArray[0x5e] = ord($cmapData[$i++]);
  260. $this->_glyphIndexArray[0x5f] = ord($cmapData[$i++]);
  261. $this->_glyphIndexArray[0x60] = ord($cmapData[$i++]);
  262. $this->_glyphIndexArray[0x61] = ord($cmapData[$i++]);
  263. $this->_glyphIndexArray[0x62] = ord($cmapData[$i++]);
  264. $this->_glyphIndexArray[0x63] = ord($cmapData[$i++]);
  265. $this->_glyphIndexArray[0x64] = ord($cmapData[$i++]);
  266. $this->_glyphIndexArray[0x65] = ord($cmapData[$i++]);
  267. $this->_glyphIndexArray[0x66] = ord($cmapData[$i++]);
  268. $this->_glyphIndexArray[0x67] = ord($cmapData[$i++]);
  269. $this->_glyphIndexArray[0x68] = ord($cmapData[$i++]);
  270. $this->_glyphIndexArray[0x69] = ord($cmapData[$i++]);
  271. $this->_glyphIndexArray[0x6a] = ord($cmapData[$i++]);
  272. $this->_glyphIndexArray[0x6b] = ord($cmapData[$i++]);
  273. $this->_glyphIndexArray[0x6c] = ord($cmapData[$i++]);
  274. $this->_glyphIndexArray[0x6d] = ord($cmapData[$i++]);
  275. $this->_glyphIndexArray[0x6e] = ord($cmapData[$i++]);
  276. $this->_glyphIndexArray[0x6f] = ord($cmapData[$i++]);
  277. $this->_glyphIndexArray[0x70] = ord($cmapData[$i++]);
  278. $this->_glyphIndexArray[0x71] = ord($cmapData[$i++]);
  279. $this->_glyphIndexArray[0x72] = ord($cmapData[$i++]);
  280. $this->_glyphIndexArray[0x73] = ord($cmapData[$i++]);
  281. $this->_glyphIndexArray[0x74] = ord($cmapData[$i++]);
  282. $this->_glyphIndexArray[0x75] = ord($cmapData[$i++]);
  283. $this->_glyphIndexArray[0x76] = ord($cmapData[$i++]);
  284. $this->_glyphIndexArray[0x77] = ord($cmapData[$i++]);
  285. $this->_glyphIndexArray[0x78] = ord($cmapData[$i++]);
  286. $this->_glyphIndexArray[0x79] = ord($cmapData[$i++]);
  287. $this->_glyphIndexArray[0x7a] = ord($cmapData[$i++]);
  288. $this->_glyphIndexArray[0x7b] = ord($cmapData[$i++]);
  289. $this->_glyphIndexArray[0x7c] = ord($cmapData[$i++]);
  290. $this->_glyphIndexArray[0x7d] = ord($cmapData[$i++]);
  291. $this->_glyphIndexArray[0x7e] = ord($cmapData[$i++]);
  292. $this->_glyphIndexArray[0x7f] = ord($cmapData[$i++]);
  293. $this->_glyphIndexArray[0xc4] = ord($cmapData[$i++]);
  294. $this->_glyphIndexArray[0xc5] = ord($cmapData[$i++]);
  295. $this->_glyphIndexArray[0xc7] = ord($cmapData[$i++]);
  296. $this->_glyphIndexArray[0xc9] = ord($cmapData[$i++]);
  297. $this->_glyphIndexArray[0xd1] = ord($cmapData[$i++]);
  298. $this->_glyphIndexArray[0xd6] = ord($cmapData[$i++]);
  299. $this->_glyphIndexArray[0xdc] = ord($cmapData[$i++]);
  300. $this->_glyphIndexArray[0xe1] = ord($cmapData[$i++]);
  301. $this->_glyphIndexArray[0xe0] = ord($cmapData[$i++]);
  302. $this->_glyphIndexArray[0xe2] = ord($cmapData[$i++]);
  303. $this->_glyphIndexArray[0xe4] = ord($cmapData[$i++]);
  304. $this->_glyphIndexArray[0xe3] = ord($cmapData[$i++]);
  305. $this->_glyphIndexArray[0xe5] = ord($cmapData[$i++]);
  306. $this->_glyphIndexArray[0xe7] = ord($cmapData[$i++]);
  307. $this->_glyphIndexArray[0xe9] = ord($cmapData[$i++]);
  308. $this->_glyphIndexArray[0xe8] = ord($cmapData[$i++]);
  309. $this->_glyphIndexArray[0xea] = ord($cmapData[$i++]);
  310. $this->_glyphIndexArray[0xeb] = ord($cmapData[$i++]);
  311. $this->_glyphIndexArray[0xed] = ord($cmapData[$i++]);
  312. $this->_glyphIndexArray[0xec] = ord($cmapData[$i++]);
  313. $this->_glyphIndexArray[0xee] = ord($cmapData[$i++]);
  314. $this->_glyphIndexArray[0xef] = ord($cmapData[$i++]);
  315. $this->_glyphIndexArray[0xf1] = ord($cmapData[$i++]);
  316. $this->_glyphIndexArray[0xf3] = ord($cmapData[$i++]);
  317. $this->_glyphIndexArray[0xf2] = ord($cmapData[$i++]);
  318. $this->_glyphIndexArray[0xf4] = ord($cmapData[$i++]);
  319. $this->_glyphIndexArray[0xf6] = ord($cmapData[$i++]);
  320. $this->_glyphIndexArray[0xf5] = ord($cmapData[$i++]);
  321. $this->_glyphIndexArray[0xfa] = ord($cmapData[$i++]);
  322. $this->_glyphIndexArray[0xf9] = ord($cmapData[$i++]);
  323. $this->_glyphIndexArray[0xfb] = ord($cmapData[$i++]);
  324. $this->_glyphIndexArray[0xfc] = ord($cmapData[$i++]);
  325. $this->_glyphIndexArray[0x2020] = ord($cmapData[$i++]);
  326. $this->_glyphIndexArray[0xb0] = ord($cmapData[$i++]);
  327. $this->_glyphIndexArray[0xa2] = ord($cmapData[$i++]);
  328. $this->_glyphIndexArray[0xa3] = ord($cmapData[$i++]);
  329. $this->_glyphIndexArray[0xa7] = ord($cmapData[$i++]);
  330. $this->_glyphIndexArray[0x2022] = ord($cmapData[$i++]);
  331. $this->_glyphIndexArray[0xb6] = ord($cmapData[$i++]);
  332. $this->_glyphIndexArray[0xdf] = ord($cmapData[$i++]);
  333. $this->_glyphIndexArray[0xae] = ord($cmapData[$i++]);
  334. $this->_glyphIndexArray[0xa9] = ord($cmapData[$i++]);
  335. $this->_glyphIndexArray[0x2122] = ord($cmapData[$i++]);
  336. $this->_glyphIndexArray[0xb4] = ord($cmapData[$i++]);
  337. $this->_glyphIndexArray[0xa8] = ord($cmapData[$i++]);
  338. $this->_glyphIndexArray[0x2260] = ord($cmapData[$i++]);
  339. $this->_glyphIndexArray[0xc6] = ord($cmapData[$i++]);
  340. $this->_glyphIndexArray[0xd8] = ord($cmapData[$i++]);
  341. $this->_glyphIndexArray[0x221e] = ord($cmapData[$i++]);
  342. $this->_glyphIndexArray[0xb1] = ord($cmapData[$i++]);
  343. $this->_glyphIndexArray[0x2264] = ord($cmapData[$i++]);
  344. $this->_glyphIndexArray[0x2265] = ord($cmapData[$i++]);
  345. $this->_glyphIndexArray[0xa5] = ord($cmapData[$i++]);
  346. $this->_glyphIndexArray[0xb5] = ord($cmapData[$i++]);
  347. $this->_glyphIndexArray[0x2202] = ord($cmapData[$i++]);
  348. $this->_glyphIndexArray[0x2211] = ord($cmapData[$i++]);
  349. $this->_glyphIndexArray[0x220f] = ord($cmapData[$i++]);
  350. $this->_glyphIndexArray[0x03c0] = ord($cmapData[$i++]);
  351. $this->_glyphIndexArray[0x222b] = ord($cmapData[$i++]);
  352. $this->_glyphIndexArray[0xaa] = ord($cmapData[$i++]);
  353. $this->_glyphIndexArray[0xba] = ord($cmapData[$i++]);
  354. $this->_glyphIndexArray[0x03a9] = ord($cmapData[$i++]);
  355. $this->_glyphIndexArray[0xe6] = ord($cmapData[$i++]);
  356. $this->_glyphIndexArray[0xf8] = ord($cmapData[$i++]);
  357. $this->_glyphIndexArray[0xbf] = ord($cmapData[$i++]);
  358. $this->_glyphIndexArray[0xa1] = ord($cmapData[$i++]);
  359. $this->_glyphIndexArray[0xac] = ord($cmapData[$i++]);
  360. $this->_glyphIndexArray[0x221a] = ord($cmapData[$i++]);
  361. $this->_glyphIndexArray[0x0192] = ord($cmapData[$i++]);
  362. $this->_glyphIndexArray[0x2248] = ord($cmapData[$i++]);
  363. $this->_glyphIndexArray[0x2206] = ord($cmapData[$i++]);
  364. $this->_glyphIndexArray[0xab] = ord($cmapData[$i++]);
  365. $this->_glyphIndexArray[0xbb] = ord($cmapData[$i++]);
  366. $this->_glyphIndexArray[0x2026] = ord($cmapData[$i++]);
  367. $this->_glyphIndexArray[0xa0] = ord($cmapData[$i++]);
  368. $this->_glyphIndexArray[0xc0] = ord($cmapData[$i++]);
  369. $this->_glyphIndexArray[0xc3] = ord($cmapData[$i++]);
  370. $this->_glyphIndexArray[0xd5] = ord($cmapData[$i++]);
  371. $this->_glyphIndexArray[0x0152] = ord($cmapData[$i++]);
  372. $this->_glyphIndexArray[0x0153] = ord($cmapData[$i++]);
  373. $this->_glyphIndexArray[0x2013] = ord($cmapData[$i++]);
  374. $this->_glyphIndexArray[0x2014] = ord($cmapData[$i++]);
  375. $this->_glyphIndexArray[0x201c] = ord($cmapData[$i++]);
  376. $this->_glyphIndexArray[0x201d] = ord($cmapData[$i++]);
  377. $this->_glyphIndexArray[0x2018] = ord($cmapData[$i++]);
  378. $this->_glyphIndexArray[0x2019] = ord($cmapData[$i++]);
  379. $this->_glyphIndexArray[0xf7] = ord($cmapData[$i++]);
  380. $this->_glyphIndexArray[0x25ca] = ord($cmapData[$i++]);
  381. $this->_glyphIndexArray[0xff] = ord($cmapData[$i++]);
  382. $this->_glyphIndexArray[0x0178] = ord($cmapData[$i++]);
  383. $this->_glyphIndexArray[0x2044] = ord($cmapData[$i++]);
  384. $this->_glyphIndexArray[0x20ac] = ord($cmapData[$i++]);
  385. $this->_glyphIndexArray[0x2039] = ord($cmapData[$i++]);
  386. $this->_glyphIndexArray[0x203a] = ord($cmapData[$i++]);
  387. $this->_glyphIndexArray[0xfb01] = ord($cmapData[$i++]);
  388. $this->_glyphIndexArray[0xfb02] = ord($cmapData[$i++]);
  389. $this->_glyphIndexArray[0x2021] = ord($cmapData[$i++]);
  390. $this->_glyphIndexArray[0xb7] = ord($cmapData[$i++]);
  391. $this->_glyphIndexArray[0x201a] = ord($cmapData[$i++]);
  392. $this->_glyphIndexArray[0x201e] = ord($cmapData[$i++]);
  393. $this->_glyphIndexArray[0x2030] = ord($cmapData[$i++]);
  394. $this->_glyphIndexArray[0xc2] = ord($cmapData[$i++]);
  395. $this->_glyphIndexArray[0xca] = ord($cmapData[$i++]);
  396. $this->_glyphIndexArray[0xc1] = ord($cmapData[$i++]);
  397. $this->_glyphIndexArray[0xcb] = ord($cmapData[$i++]);
  398. $this->_glyphIndexArray[0xc8] = ord($cmapData[$i++]);
  399. $this->_glyphIndexArray[0xcd] = ord($cmapData[$i++]);
  400. $this->_glyphIndexArray[0xce] = ord($cmapData[$i++]);
  401. $this->_glyphIndexArray[0xcf] = ord($cmapData[$i++]);
  402. $this->_glyphIndexArray[0xcc] = ord($cmapData[$i++]);
  403. $this->_glyphIndexArray[0xd3] = ord($cmapData[$i++]);
  404. $this->_glyphIndexArray[0xd4] = ord($cmapData[$i++]);
  405. $this->_glyphIndexArray[0xf8ff] = ord($cmapData[$i++]);
  406. $this->_glyphIndexArray[0xd2] = ord($cmapData[$i++]);
  407. $this->_glyphIndexArray[0xda] = ord($cmapData[$i++]);
  408. $this->_glyphIndexArray[0xdb] = ord($cmapData[$i++]);
  409. $this->_glyphIndexArray[0xd9] = ord($cmapData[$i++]);
  410. $this->_glyphIndexArray[0x0131] = ord($cmapData[$i++]);
  411. $this->_glyphIndexArray[0x02c6] = ord($cmapData[$i++]);
  412. $this->_glyphIndexArray[0x02dc] = ord($cmapData[$i++]);
  413. $this->_glyphIndexArray[0xaf] = ord($cmapData[$i++]);
  414. $this->_glyphIndexArray[0x02d8] = ord($cmapData[$i++]);
  415. $this->_glyphIndexArray[0x02d9] = ord($cmapData[$i++]);
  416. $this->_glyphIndexArray[0x02da] = ord($cmapData[$i++]);
  417. $this->_glyphIndexArray[0xb8] = ord($cmapData[$i++]);
  418. $this->_glyphIndexArray[0x02dd] = ord($cmapData[$i++]);
  419. $this->_glyphIndexArray[0x02db] = ord($cmapData[$i++]);
  420. $this->_glyphIndexArray[0x02c7] = ord($cmapData[$i]);
  421. }
  422. }