当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Pdf_Cmap类代码示例

本文整理汇总了PHP中Zend_Pdf_Cmap的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Pdf_Cmap类的具体用法?PHP Zend_Pdf_Cmap怎么用?PHP Zend_Pdf_Cmap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Zend_Pdf_Cmap类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Object constructor
  */
 public function __construct()
 {
     parent::__construct();
     /* Object properties */
     $this->_fontType = Zend_Pdf_Font::TYPE_STANDARD;
     /* The font names are stored internally as Unicode UTF-16BE-encoded
      * strings. Since this information is static, save unnecessary trips
      * through iconv() and just use pre-encoded hexidecimal strings.
      */
     $this->_fontNames[Zend_Pdf_Font::NAME_COPYRIGHT]['en'] = "Copyrigh" . "t (c) 19" . "85, 1987" . ", 1989, " . "1990, 19" . "97 Adobe" . " Systems" . " Incorpo" . "rated.  " . "All Righ" . "ts Reser" . "ved.Helv" . "etica is" . " a trade" . "mark of " . "Linotype" . "-Hell AG" . " and/or " . "its subs" . "idiaries" . ".";
     $this->_fontNames[Zend_Pdf_Font::NAME_FAMILY]['en'] = "Helvetic" . "a";
     $this->_fontNames[Zend_Pdf_Font::NAME_STYLE]['en'] = "Bold";
     $this->_fontNames[Zend_Pdf_Font::NAME_ID]['en'] = "43052";
     $this->_fontNames[Zend_Pdf_Font::NAME_FULL]['en'] = "Helvetic" . "a-Bold B" . "old";
     $this->_fontNames[Zend_Pdf_Font::NAME_VERSION]['en'] = "002.000";
     $this->_fontNames[Zend_Pdf_Font::NAME_POSTSCRIPT]['en'] = "Helvetic" . "a-Bold";
     $this->_isBold = true;
     $this->_isItalic = false;
     $this->_isMonospaced = false;
     $this->_underlinePosition = -100;
     $this->_underlineThickness = 50;
     $this->_strikePosition = 225;
     $this->_strikeThickness = 50;
     $this->_unitsPerEm = 1000;
     $this->_ascent = 718;
     $this->_descent = -207;
     $this->_lineGap = 275;
     /* The glyph numbers assigned here are synthetic; they do not match the
      * actual glyph numbers used by the font. This is not a big deal though
      * since this data never makes it to the PDF file. It is only used
      * internally for layout calculations.
      */
     $this->_glyphWidths = array(0x0 => 0x1f4, 0x1 => 0x116, 0x2 => 0x14d, 0x3 => 0x1da, 0x4 => 0x22c, 0x5 => 0x22c, 0x6 => 0x379, 0x7 => 0x2d2, 0x8 => 0x116, 0x9 => 0x14d, 0xa => 0x14d, 0xb => 0x185, 0xc => 0x248, 0xd => 0x116, 0xe => 0x14d, 0xf => 0x116, 0x10 => 0x116, 0x11 => 0x22c, 0x12 => 0x22c, 0x13 => 0x22c, 0x14 => 0x22c, 0x15 => 0x22c, 0x16 => 0x22c, 0x17 => 0x22c, 0x18 => 0x22c, 0x19 => 0x22c, 0x1a => 0x22c, 0x1b => 0x14d, 0x1c => 0x14d, 0x1d => 0x248, 0x1e => 0x248, 0x1f => 0x248, 0x20 => 0x263, 0x21 => 0x3cf, 0x22 => 0x2d2, 0x23 => 0x2d2, 0x24 => 0x2d2, 0x25 => 0x2d2, 0x26 => 0x29b, 0x27 => 0x263, 0x28 => 0x30a, 0x29 => 0x2d2, 0x2a => 0x116, 0x2b => 0x22c, 0x2c => 0x2d2, 0x2d => 0x263, 0x2e => 0x341, 0x2f => 0x2d2, 0x30 => 0x30a, 0x31 => 0x29b, 0x32 => 0x30a, 0x33 => 0x2d2, 0x34 => 0x29b, 0x35 => 0x263, 0x36 => 0x2d2, 0x37 => 0x29b, 0x38 => 0x3b0, 0x39 => 0x29b, 0x3a => 0x29b, 0x3b => 0x263, 0x3c => 0x14d, 0x3d => 0x116, 0x3e => 0x14d, 0x3f => 0x248, 0x40 => 0x22c, 0x41 => 0x116, 0x42 => 0x22c, 0x43 => 0x263, 0x44 => 0x22c, 0x45 => 0x263, 0x46 => 0x22c, 0x47 => 0x14d, 0x48 => 0x263, 0x49 => 0x263, 0x4a => 0x116, 0x4b => 0x116, 0x4c => 0x22c, 0x4d => 0x116, 0x4e => 0x379, 0x4f => 0x263, 0x50 => 0x263, 0x51 => 0x263, 0x52 => 0x263, 0x53 => 0x185, 0x54 => 0x22c, 0x55 => 0x14d, 0x56 => 0x263, 0x57 => 0x22c, 0x58 => 0x30a, 0x59 => 0x22c, 0x5a => 0x22c, 0x5b => 0x1f4, 0x5c => 0x185, 0x5d => 0x118, 0x5e => 0x185, 0x5f => 0x248, 0x60 => 0x14d, 0x61 => 0x22c, 0x62 => 0x22c, 0x63 => 0xa7, 0x64 => 0x22c, 0x65 => 0x22c, 0x66 => 0x22c, 0x67 => 0x22c, 0x68 => 0xee, 0x69 => 0x1f4, 0x6a => 0x22c, 0x6b => 0x14d, 0x6c => 0x14d, 0x6d => 0x263, 0x6e => 0x263, 0x6f => 0x22c, 0x70 => 0x22c, 0x71 => 0x22c, 0x72 => 0x116, 0x73 => 0x22c, 0x74 => 0x15e, 0x75 => 0x116, 0x76 => 0x1f4, 0x77 => 0x1f4, 0x78 => 0x22c, 0x79 => 0x3e8, 0x7a => 0x3e8, 0x7b => 0x263, 0x7c => 0x14d, 0x7d => 0x14d, 0x7e => 0x14d, 0x7f => 0x14d, 0x80 => 0x14d, 0x81 => 0x14d, 0x82 => 0x14d, 0x83 => 0x14d, 0x84 => 0x14d, 0x85 => 0x14d, 0x86 => 0x14d, 0x87 => 0x14d, 0x88 => 0x14d, 0x89 => 0x3e8, 0x8a => 0x3e8, 0x8b => 0x172, 0x8c => 0x263, 0x8d => 0x30a, 0x8e => 0x3e8, 0x8f => 0x16d, 0x90 => 0x379, 0x91 => 0x116, 0x92 => 0x116, 0x93 => 0x263, 0x94 => 0x3b0, 0x95 => 0x263, 0x96 => 0x116, 0x97 => 0x22c, 0x98 => 0x22c, 0x99 => 0x263, 0x9a => 0x22c, 0x9b => 0x29b, 0x9c => 0x248, 0x9d => 0x29b, 0x9e => 0x2d2, 0x9f => 0x22c, 0xa0 => 0x2d2, 0xa1 => 0x22c, 0xa2 => 0x22c, 0xa3 => 0x22c, 0xa4 => 0x2d2, 0xa5 => 0x2d2, 0xa6 => 0x22c, 0xa7 => 0x2d2, 0xa8 => 0x263, 0xa9 => 0x29b, 0xaa => 0x2d2, 0xab => 0xfa, 0xac => 0x2e1, 0xad => 0x29b, 0xae => 0x22c, 0xaf => 0x22c, 0xb0 => 0x2d2, 0xb1 => 0x116, 0xb2 => 0x22c, 0xb3 => 0x263, 0xb4 => 0x2d2, 0xb5 => 0x22c, 0xb6 => 0x29b, 0xb7 => 0x22c, 0xb8 => 0x22c, 0xb9 => 0x116, 0xba => 0x1ee, 0xbb => 0x2d2, 0xbc => 0x30a, 0xbd => 0x263, 0xbe => 0x22c, 0xbf => 0x2d2, 0xc0 => 0x185, 0xc1 => 0x22c, 0xc2 => 0x263, 0xc3 => 0x29b, 0xc4 => 0x30a, 0xc5 => 0x2d2, 0xc6 => 0x29b, 0xc7 => 0x2e7, 0xc8 => 0x2d2, 0xc9 => 0x263, 0xca => 0x14d, 0xcb => 0x30a, 0xcc => 0x2d2, 0xcd => 0x2d2, 0xce => 0x248, 0xcf => 0x263, 0xd0 => 0x263, 0xd1 => 0x1ee, 0xd2 => 0x22c, 0xd3 => 0x2d2, 0xd4 => 0x116, 0xd5 => 0x29b, 0xd6 => 0x22c, 0xd7 => 0x22c, 0xd8 => 0x22c, 0xd9 => 0x263, 0xda => 0x263, 0xdb => 0x2d2, 0xdc => 0x116, 0xdd => 0x248, 0xde => 0x118, 0xdf => 0x2e1, 0xe0 => 0x30a, 0xe1 => 0x116, 0xe2 => 0x258, 0xe3 => 0x29b, 0xe4 => 0x185, 0xe5 => 0x263, 0xe6 => 0x263, 0xe7 => 0x263, 0xe8 => 0x225, 0xe9 => 0x2d2, 0xea => 0x2d2, 0xeb => 0x116, 0xec => 0x185, 0xed => 0x22c, 0xee => 0x2d2, 0xef => 0x2d2, 0xf0 => 0x2d2, 0xf1 => 0x22c, 0xf2 => 0x1f4, 0xf3 => 0x116, 0xf4 => 0x30a, 0xf5 => 0x263, 0xf6 => 0x22c, 0xf7 => 0x22c, 0xf8 => 0x116, 0xf9 => 0x30a, 0xfa => 0x2d2, 0xfb => 0x264, 0xfc => 0x263, 0xfd => 0x14d, 0xfe => 0x30a, 0xff => 0x263, 0x100 => 0x116, 0x101 => 0x263, 0x102 => 0x29b, 0x103 => 0x263, 0x104 => 0x342, 0x105 => 0x29b, 0x106 => 0x190, 0x107 => 0x2d2, 0x108 => 0x263, 0x109 => 0x3e8, 0x10a => 0x22c, 0x10b => 0x116, 0x10c => 0x116, 0x10d => 0x263, 0x10e => 0x342, 0x10f => 0x225, 0x110 => 0x263, 0x111 => 0x263, 0x112 => 0x2d2, 0x113 => 0x29b, 0x114 => 0x22c, 0x115 => 0x263, 0x116 => 0x342, 0x117 => 0x29b, 0x118 => 0x29b, 0x119 => 0x30a, 0x11a => 0x190, 0x11b => 0x263, 0x11c => 0x2d2, 0x11d => 0x263, 0x11e => 0x225, 0x11f => 0x2d2, 0x120 => 0x185, 0x121 => 0x2d2, 0x122 => 0x263, 0x123 => 0x2d2, 0x124 => 0x263, 0x125 => 0x2d2, 0x126 => 0x2d2, 0x127 => 0x2d2, 0x128 => 0x30a, 0x129 => 0x1f4, 0x12a => 0x29b, 0x12b => 0x116, 0x12c => 0x22c, 0x12d => 0x248, 0x12e => 0x116, 0x12f => 0x263, 0x130 => 0x14d, 0x131 => 0x248, 0x132 => 0x263, 0x133 => 0x263, 0x134 => 0x225, 0x135 => 0x263, 0x136 => 0x263, 0x137 => 0x1f4, 0x138 => 0x263, 0x139 => 0x14d, 0x13a => 0x116, 0x13b => 0x22c);
     $this->_glyphMaxIndex = 315;
     /* The cmap table is similarly synthesized.
      */
     $cmapData = array(0x20 => 0x1, 0x21 => 0x2, 0x22 => 0x3, 0x23 => 0x4, 0x24 => 0x5, 0x25 => 0x6, 0x26 => 0x7, 0x2019 => 0x8, 0x28 => 0x9, 0x29 => 0xa, 0x2a => 0xb, 0x2b => 0xc, 0x2c => 0xd, 0x2d => 0xe, 0x2e => 0xf, 0x2f => 0x10, 0x30 => 0x11, 0x31 => 0x12, 0x32 => 0x13, 0x33 => 0x14, 0x34 => 0x15, 0x35 => 0x16, 0x36 => 0x17, 0x37 => 0x18, 0x38 => 0x19, 0x39 => 0x1a, 0x3a => 0x1b, 0x3b => 0x1c, 0x3c => 0x1d, 0x3d => 0x1e, 0x3e => 0x1f, 0x3f => 0x20, 0x40 => 0x21, 0x41 => 0x22, 0x42 => 0x23, 0x43 => 0x24, 0x44 => 0x25, 0x45 => 0x26, 0x46 => 0x27, 0x47 => 0x28, 0x48 => 0x29, 0x49 => 0x2a, 0x4a => 0x2b, 0x4b => 0x2c, 0x4c => 0x2d, 0x4d => 0x2e, 0x4e => 0x2f, 0x4f => 0x30, 0x50 => 0x31, 0x51 => 0x32, 0x52 => 0x33, 0x53 => 0x34, 0x54 => 0x35, 0x55 => 0x36, 0x56 => 0x37, 0x57 => 0x38, 0x58 => 0x39, 0x59 => 0x3a, 0x5a => 0x3b, 0x5b => 0x3c, 0x5c => 0x3d, 0x5d => 0x3e, 0x5e => 0x3f, 0x5f => 0x40, 0x2018 => 0x41, 0x61 => 0x42, 0x62 => 0x43, 0x63 => 0x44, 0x64 => 0x45, 0x65 => 0x46, 0x66 => 0x47, 0x67 => 0x48, 0x68 => 0x49, 0x69 => 0x4a, 0x6a => 0x4b, 0x6b => 0x4c, 0x6c => 0x4d, 0x6d => 0x4e, 0x6e => 0x4f, 0x6f => 0x50, 0x70 => 0x51, 0x71 => 0x52, 0x72 => 0x53, 0x73 => 0x54, 0x74 => 0x55, 0x75 => 0x56, 0x76 => 0x57, 0x77 => 0x58, 0x78 => 0x59, 0x79 => 0x5a, 0x7a => 0x5b, 0x7b => 0x5c, 0x7c => 0x5d, 0x7d => 0x5e, 0x7e => 0x5f, 0xa1 => 0x60, 0xa2 => 0x61, 0xa3 => 0x62, 0x2044 => 0x63, 0xa5 => 0x64, 0x192 => 0x65, 0xa7 => 0x66, 0xa4 => 0x67, 0x27 => 0x68, 0x201c => 0x69, 0xab => 0x6a, 0x2039 => 0x6b, 0x203a => 0x6c, 0xfb01 => 0x6d, 0xfb02 => 0x6e, 0x2013 => 0x6f, 0x2020 => 0x70, 0x2021 => 0x71, 0xb7 => 0x72, 0xb6 => 0x73, 0x2022 => 0x74, 0x201a => 0x75, 0x201e => 0x76, 0x201d => 0x77, 0xbb => 0x78, 0x2026 => 0x79, 0x2030 => 0x7a, 0xbf => 0x7b, 0x60 => 0x7c, 0xb4 => 0x7d, 0x2c6 => 0x7e, 0x2dc => 0x7f, 0xaf => 0x80, 0x2d8 => 0x81, 0x2d9 => 0x82, 0xa8 => 0x83, 0x2da => 0x84, 0xb8 => 0x85, 0x2dd => 0x86, 0x2db => 0x87, 0x2c7 => 0x88, 0x2014 => 0x89, 0xc6 => 0x8a, 0xaa => 0x8b, 0x141 => 0x8c, 0xd8 => 0x8d, 0x152 => 0x8e, 0xba => 0x8f, 0xe6 => 0x90, 0x131 => 0x91, 0x142 => 0x92, 0xf8 => 0x93, 0x153 => 0x94, 0xdf => 0x95, 0xcf => 0x96, 0xe9 => 0x97, 0x103 => 0x98, 0x171 => 0x99, 0x11b => 0x9a, 0x178 => 0x9b, 0xf7 => 0x9c, 0xdd => 0x9d, 0xc2 => 0x9e, 0xe1 => 0x9f, 0xdb => 0xa0, 0xfd => 0xa1, 0x219 => 0xa2, 0xea => 0xa3, 0x16e => 0xa4, 0xdc => 0xa5, 0x105 => 0xa6, 0xda => 0xa7, 0x173 => 0xa8, 0xcb => 0xa9, 0x110 => 0xaa, 0xf6c3 => 0xab, 0xa9 => 0xac, 0x112 => 0xad, 0x10d => 0xae, 0xe5 => 0xaf, 0x145 => 0xb0, 0x13a => 0xb1, 0xe0 => 0xb2, 0x162 => 0xb3, 0x106 => 0xb4, 0xe3 => 0xb5, 0x116 => 0xb6, 0x161 => 0xb7, 0x15f => 0xb8, 0xed => 0xb9, 0x25ca => 0xba, 0x158 => 0xbb, 0x122 => 0xbc, 0xfb => 0xbd, 0xe2 => 0xbe, 0x100 => 0xbf, 0x159 => 0xc0, 0xe7 => 0xc1, 0x17b => 0xc2, 0xde => 0xc3, 0x14c => 0xc4, 0x154 => 0xc5, 0x15a => 0xc6, 0x10f => 0xc7, 0x16a => 0xc8, 0x16f => 0xc9, 0xb3 => 0xca, 0xd2 => 0xcb, 0xc0 => 0xcc, 0x102 => 0xcd, 0xd7 => 0xce, 0xfa => 0xcf, 0x164 => 0xd0, 0x2202 => 0xd1, 0xff => 0xd2, 0x143 => 0xd3, 0xee => 0xd4, 0xca => 0xd5, 0xe4 => 0xd6, 0xeb => 0xd7, 0x107 => 0xd8, 0x144 => 0xd9, 0x16b => 0xda, 0x147 => 0xdb, 0xcd => 0xdc, 0xb1 => 0xdd, 0xa6 => 0xde, 0xae => 0xdf, 0x11e => 0xe0, 0x130 => 0xe1, 0x2211 => 0xe2, 0xc8 => 0xe3, 0x155 => 0xe4, 0x14d => 0xe5, 0x179 => 0xe6, 0x17d => 0xe7, 0x2265 => 0xe8, 0xd0 => 0xe9, 0xc7 => 0xea, 0x13c => 0xeb, 0x165 => 0xec, 0x119 => 0xed, 0x172 => 0xee, 0xc1 => 0xef, 0xc4 => 0xf0, 0xe8 => 0xf1, 0x17a => 0xf2, 0x12f => 0xf3, 0xd3 => 0xf4, 0xf3 => 0xf5, 0x101 => 0xf6, 0x15b => 0xf7, 0xef => 0xf8, 0xd4 => 0xf9, 0xd9 => 0xfa, 0x2206 => 0xfb, 0xfe => 0xfc, 0xb2 => 0xfd, 0xd6 => 0xfe, 0xb5 => 0xff, 0xec => 0x100, 0x151 => 0x101, 0x118 => 0x102, 0x111 => 0x103, 0xbe => 0x104, 0x15e => 0x105, 0x13e => 0x106, 0x136 => 0x107, 0x139 => 0x108, 0x2122 => 0x109, 0x117 => 0x10a, 0xcc => 0x10b, 0x12a => 0x10c, 0x13d => 0x10d, 0xbd => 0x10e, 0x2264 => 0x10f, 0xf4 => 0x110, 0xf1 => 0x111, 0x170 => 0x112, 0xc9 => 0x113, 0x113 => 0x114, 0x11f => 0x115, 0xbc => 0x116, 0x160 => 0x117, 0x218 => 0x118, 0x150 => 0x119, 0xb0 => 0x11a, 0xf2 => 0x11b, 0x10c => 0x11c, 0xf9 => 0x11d, 0x221a => 0x11e, 0x10e => 0x11f, 0x157 => 0x120, 0xd1 => 0x121, 0xf5 => 0x122, 0x156 => 0x123, 0x13b => 0x124, 0xc3 => 0x125, 0x104 => 0x126, 0xc5 => 0x127, 0xd5 => 0x128, 0x17c => 0x129, 0x11a => 0x12a, 0x12e => 0x12b, 0x137 => 0x12c, 0x2212 => 0x12d, 0xce => 0x12e, 0x148 => 0x12f, 0x163 => 0x130, 0xac => 0x131, 0xf6 => 0x132, 0xfc => 0x133, 0x2260 => 0x134, 0x123 => 0x135, 0xf0 => 0x136, 0x17e => 0x137, 0x146 => 0x138, 0xb9 => 0x139, 0x12b => 0x13a, 0x20ac => 0x13b);
     $this->cmap = Zend_Pdf_Cmap::cmapWithTypeData(Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
     /* Resource dictionary */
     /* The resource dictionary for the standard fonts is sparse because PDF
      * viewers already have all of the metrics data. We only need to provide
      * the font name and encoding method.
      */
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name('Helvetica-Bold');
     $this->_resource->Encoding = new Zend_Pdf_Element_Name('WinAnsiEncoding');
 }
开发者ID:BackupTheBerlios,项目名称:openpublisher-svn,代码行数:49,代码来源:HelveticaBold.php

示例2: _parseCmapTable


//.........这里部分代码省略.........
      */
     $offsets = array();
     /* Unicode 2.0 or later semantics
      */
     if (isset($subtables[0][3])) {
         foreach ($subtables[0][3] as $offset) {
             $offsets[] = $offset;
         }
     }
     /* Unicode default semantics
      */
     if (isset($subtables[0][0])) {
         foreach ($subtables[0][0] as $offset) {
             $offsets[] = $offset;
         }
     }
     /* Microsoft Unicode
      */
     if (isset($subtables[3][1])) {
         foreach ($subtables[3][1] as $offset) {
             $offsets[] = $offset;
         }
     }
     /* Mac Roman.
      */
     if (isset($subtables[1][0])) {
         foreach ($subtables[1][0] as $offset) {
             $offsets[] = $offset;
         }
     }
     $cmapType = -1;
     foreach ($offsets as $offset) {
         $cmapOffset = $baseOffset + $offset;
         $this->moveToOffset($cmapOffset);
         $format = $this->readUInt(2);
         $language = -1;
         switch ($format) {
             case 0x0:
                 $cmapLength = $this->readUInt(2);
                 $language = $this->readUInt(2);
                 if ($language != 0) {
                     $this->_debugLog('Type 0 cmap tables must be language-independent;' . ' language: %d; skipping', $language);
                     continue;
                 }
                 break;
             case 0x4:
                 // break intentionally omitted
             // break intentionally omitted
             case 0x6:
                 $cmapLength = $this->readUInt(2);
                 $language = $this->readUInt(2);
                 if ($language != 0) {
                     $this->_debugLog('Warning: cmap tables must be language-independent - this font' . ' may not work properly; language: %d', $language);
                 }
                 break;
             case 0x2:
                 // break intentionally omitted
             // break intentionally omitted
             case 0x8:
                 // break intentionally omitted
             // break intentionally omitted
             case 0xa:
                 // break intentionally omitted
             // break intentionally omitted
             case 0xc:
                 $this->_debugLog('Format: 0x%x currently unsupported; skipping', $format);
                 continue;
                 //$this->skipBytes(2);
                 //$cmapLength = $this->readUInt(4);
                 //$language = $this->readUInt(4);
                 //if ($language != 0) {
                 //    $this->_debugLog('Warning: cmap tables must be language-independent - this font'
                 //                     . ' may not work properly; language: %d', $language);
                 //}
                 //break;
             //$this->skipBytes(2);
             //$cmapLength = $this->readUInt(4);
             //$language = $this->readUInt(4);
             //if ($language != 0) {
             //    $this->_debugLog('Warning: cmap tables must be language-independent - this font'
             //                     . ' may not work properly; language: %d', $language);
             //}
             //break;
             default:
                 $this->_debugLog('Unknown subtable format: 0x%x; skipping', $format);
                 continue;
         }
         $cmapType = $format;
         break;
     }
     if ($cmapType == -1) {
         throw new Zend_Pdf_Exception('Unable to find usable cmap table', Zend_Pdf_Exception::CANT_FIND_GOOD_CMAP);
     }
     /* Now extract the subtable data and create a Zend_Pdf_FontCmap object.
      */
     $this->_debugLog('Using cmap type %d; offset: 0x%x; length: %d', $cmapType, $cmapOffset, $cmapLength);
     $this->moveToOffset($cmapOffset);
     $cmapData = $this->readBytes($cmapLength);
     $this->cmap = Zend_Pdf_Cmap::cmapWithTypeData($cmapType, $cmapData);
 }
开发者ID:kaseya-university,项目名称:efront,代码行数:101,代码来源:OpenType.php

示例3: __construct


//.........这里部分代码省略.........
          0x0130 => 0x014d, 0x0131 => 0x023a, 0x0132 => 0x01f4, 0x0133 => 0x022c,
          0x0134 => 0x0225, 0x0135 => 0x01f4, 0x0136 => 0x01f4, 0x0137 => 0x01bc,
          0x0138 => 0x022c, 0x0139 => 0x012c, 0x013a => 0x0116, 0x013b => 0x01f4,
        );

        /* The cmap table is similarly synthesized.
         */
        $cmapData = array(
            0x20 =>   0x01,   0x21 =>   0x02,   0x22 =>   0x03,   0x23 =>   0x04,
            0x24 =>   0x05,   0x25 =>   0x06,   0x26 =>   0x07, 0x2019 =>   0x08,
            0x28 =>   0x09,   0x29 =>   0x0a,   0x2a =>   0x0b,   0x2b =>   0x0c,
            0x2c =>   0x0d,   0x2d =>   0x0e,   0x2e =>   0x0f,   0x2f =>   0x10,
            0x30 =>   0x11,   0x31 =>   0x12,   0x32 =>   0x13,   0x33 =>   0x14,
            0x34 =>   0x15,   0x35 =>   0x16,   0x36 =>   0x17,   0x37 =>   0x18,
            0x38 =>   0x19,   0x39 =>   0x1a,   0x3a =>   0x1b,   0x3b =>   0x1c,
            0x3c =>   0x1d,   0x3d =>   0x1e,   0x3e =>   0x1f,   0x3f =>   0x20,
            0x40 =>   0x21,   0x41 =>   0x22,   0x42 =>   0x23,   0x43 =>   0x24,
            0x44 =>   0x25,   0x45 =>   0x26,   0x46 =>   0x27,   0x47 =>   0x28,
            0x48 =>   0x29,   0x49 =>   0x2a,   0x4a =>   0x2b,   0x4b =>   0x2c,
            0x4c =>   0x2d,   0x4d =>   0x2e,   0x4e =>   0x2f,   0x4f =>   0x30,
            0x50 =>   0x31,   0x51 =>   0x32,   0x52 =>   0x33,   0x53 =>   0x34,
            0x54 =>   0x35,   0x55 =>   0x36,   0x56 =>   0x37,   0x57 =>   0x38,
            0x58 =>   0x39,   0x59 =>   0x3a,   0x5a =>   0x3b,   0x5b =>   0x3c,
            0x5c =>   0x3d,   0x5d =>   0x3e,   0x5e =>   0x3f,   0x5f =>   0x40,
          0x2018 =>   0x41,   0x61 =>   0x42,   0x62 =>   0x43,   0x63 =>   0x44,
            0x64 =>   0x45,   0x65 =>   0x46,   0x66 =>   0x47,   0x67 =>   0x48,
            0x68 =>   0x49,   0x69 =>   0x4a,   0x6a =>   0x4b,   0x6b =>   0x4c,
            0x6c =>   0x4d,   0x6d =>   0x4e,   0x6e =>   0x4f,   0x6f =>   0x50,
            0x70 =>   0x51,   0x71 =>   0x52,   0x72 =>   0x53,   0x73 =>   0x54,
            0x74 =>   0x55,   0x75 =>   0x56,   0x76 =>   0x57,   0x77 =>   0x58,
            0x78 =>   0x59,   0x79 =>   0x5a,   0x7a =>   0x5b,   0x7b =>   0x5c,
            0x7c =>   0x5d,   0x7d =>   0x5e,   0x7e =>   0x5f,   0xa1 =>   0x60,
            0xa2 =>   0x61,   0xa3 =>   0x62, 0x2044 =>   0x63,   0xa5 =>   0x64,
          0x0192 =>   0x65,   0xa7 =>   0x66,   0xa4 =>   0x67,   0x27 =>   0x68,
          0x201c =>   0x69,   0xab =>   0x6a, 0x2039 =>   0x6b, 0x203a =>   0x6c,
          0xfb01 =>   0x6d, 0xfb02 =>   0x6e, 0x2013 =>   0x6f, 0x2020 =>   0x70,
          0x2021 =>   0x71,   0xb7 =>   0x72,   0xb6 =>   0x73, 0x2022 =>   0x74,
          0x201a =>   0x75, 0x201e =>   0x76, 0x201d =>   0x77,   0xbb =>   0x78,
          0x2026 =>   0x79, 0x2030 =>   0x7a,   0xbf =>   0x7b,   0x60 =>   0x7c,
            0xb4 =>   0x7d, 0x02c6 =>   0x7e, 0x02dc =>   0x7f,   0xaf =>   0x80,
          0x02d8 =>   0x81, 0x02d9 =>   0x82,   0xa8 =>   0x83, 0x02da =>   0x84,
            0xb8 =>   0x85, 0x02dd =>   0x86, 0x02db =>   0x87, 0x02c7 =>   0x88,
          0x2014 =>   0x89,   0xc6 =>   0x8a,   0xaa =>   0x8b, 0x0141 =>   0x8c,
            0xd8 =>   0x8d, 0x0152 =>   0x8e,   0xba =>   0x8f,   0xe6 =>   0x90,
          0x0131 =>   0x91, 0x0142 =>   0x92,   0xf8 =>   0x93, 0x0153 =>   0x94,
            0xdf =>   0x95,   0xcf =>   0x96,   0xe9 =>   0x97, 0x0103 =>   0x98,
          0x0171 =>   0x99, 0x011b =>   0x9a, 0x0178 =>   0x9b,   0xf7 =>   0x9c,
            0xdd =>   0x9d,   0xc2 =>   0x9e,   0xe1 =>   0x9f,   0xdb =>   0xa0,
            0xfd =>   0xa1, 0x0219 =>   0xa2,   0xea =>   0xa3, 0x016e =>   0xa4,
            0xdc =>   0xa5, 0x0105 =>   0xa6,   0xda =>   0xa7, 0x0173 =>   0xa8,
            0xcb =>   0xa9, 0x0110 =>   0xaa, 0xf6c3 =>   0xab,   0xa9 =>   0xac,
          0x0112 =>   0xad, 0x010d =>   0xae,   0xe5 =>   0xaf, 0x0145 =>   0xb0,
          0x013a =>   0xb1,   0xe0 =>   0xb2, 0x0162 =>   0xb3, 0x0106 =>   0xb4,
            0xe3 =>   0xb5, 0x0116 =>   0xb6, 0x0161 =>   0xb7, 0x015f =>   0xb8,
            0xed =>   0xb9, 0x25ca =>   0xba, 0x0158 =>   0xbb, 0x0122 =>   0xbc,
            0xfb =>   0xbd,   0xe2 =>   0xbe, 0x0100 =>   0xbf, 0x0159 =>   0xc0,
            0xe7 =>   0xc1, 0x017b =>   0xc2,   0xde =>   0xc3, 0x014c =>   0xc4,
          0x0154 =>   0xc5, 0x015a =>   0xc6, 0x010f =>   0xc7, 0x016a =>   0xc8,
          0x016f =>   0xc9,   0xb3 =>   0xca,   0xd2 =>   0xcb,   0xc0 =>   0xcc,
          0x0102 =>   0xcd,   0xd7 =>   0xce,   0xfa =>   0xcf, 0x0164 =>   0xd0,
          0x2202 =>   0xd1,   0xff =>   0xd2, 0x0143 =>   0xd3,   0xee =>   0xd4,
            0xca =>   0xd5,   0xe4 =>   0xd6,   0xeb =>   0xd7, 0x0107 =>   0xd8,
          0x0144 =>   0xd9, 0x016b =>   0xda, 0x0147 =>   0xdb,   0xcd =>   0xdc,
            0xb1 =>   0xdd,   0xa6 =>   0xde,   0xae =>   0xdf, 0x011e =>   0xe0,
          0x0130 =>   0xe1, 0x2211 =>   0xe2,   0xc8 =>   0xe3, 0x0155 =>   0xe4,
          0x014d =>   0xe5, 0x0179 =>   0xe6, 0x017d =>   0xe7, 0x2265 =>   0xe8,
            0xd0 =>   0xe9,   0xc7 =>   0xea, 0x013c =>   0xeb, 0x0165 =>   0xec,
          0x0119 =>   0xed, 0x0172 =>   0xee,   0xc1 =>   0xef,   0xc4 =>   0xf0,
            0xe8 =>   0xf1, 0x017a =>   0xf2, 0x012f =>   0xf3,   0xd3 =>   0xf4,
            0xf3 =>   0xf5, 0x0101 =>   0xf6, 0x015b =>   0xf7,   0xef =>   0xf8,
            0xd4 =>   0xf9,   0xd9 =>   0xfa, 0x2206 =>   0xfb,   0xfe =>   0xfc,
            0xb2 =>   0xfd,   0xd6 =>   0xfe,   0xb5 =>   0xff,   0xec => 0x0100,
          0x0151 => 0x0101, 0x0118 => 0x0102, 0x0111 => 0x0103,   0xbe => 0x0104,
          0x015e => 0x0105, 0x013e => 0x0106, 0x0136 => 0x0107, 0x0139 => 0x0108,
          0x2122 => 0x0109, 0x0117 => 0x010a,   0xcc => 0x010b, 0x012a => 0x010c,
          0x013d => 0x010d,   0xbd => 0x010e, 0x2264 => 0x010f,   0xf4 => 0x0110,
            0xf1 => 0x0111, 0x0170 => 0x0112,   0xc9 => 0x0113, 0x0113 => 0x0114,
          0x011f => 0x0115,   0xbc => 0x0116, 0x0160 => 0x0117, 0x0218 => 0x0118,
          0x0150 => 0x0119,   0xb0 => 0x011a,   0xf2 => 0x011b, 0x010c => 0x011c,
            0xf9 => 0x011d, 0x221a => 0x011e, 0x010e => 0x011f, 0x0157 => 0x0120,
            0xd1 => 0x0121,   0xf5 => 0x0122, 0x0156 => 0x0123, 0x013b => 0x0124,
            0xc3 => 0x0125, 0x0104 => 0x0126,   0xc5 => 0x0127,   0xd5 => 0x0128,
          0x017c => 0x0129, 0x011a => 0x012a, 0x012e => 0x012b, 0x0137 => 0x012c,
          0x2212 => 0x012d,   0xce => 0x012e, 0x0148 => 0x012f, 0x0163 => 0x0130,
            0xac => 0x0131,   0xf6 => 0x0132,   0xfc => 0x0133, 0x2260 => 0x0134,
          0x0123 => 0x0135,   0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
            0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
        require_once 'Zend/Pdf/Cmap.php';
        $this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
            Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);


        /* Resource dictionary */

        /* The resource dictionary for the standard fonts is sparse because PDF
         * viewers already have all of the metrics data. We only need to provide
         * the font name and encoding method.
         */
        $this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-Bold');
    }
开发者ID:nhp,项目名称:shopware-4,代码行数:101,代码来源:TimesBold.php

示例4: __construct

 /**
  * Object constructor
  */
 public function __construct()
 {
     parent::__construct();
     /* Object properties */
     $this->_fontType = Zend_Pdf_Font::TYPE_STANDARD;
     /* The font names are stored internally as Unicode UTF-16BE-encoded
      * strings. Since this information is static, save unnecessary trips
      * through iconv() and just use pre-encoded hexidecimal strings.
      */
     $this->_fontNames[Zend_Pdf_Font::NAME_COPYRIGHT]['en'] = "Copyrigh" . "t (c) 19" . "85, 1987" . ", 1989, " . "1990, 19" . "97 Adobe" . " Systems" . " Incorpo" . "rated. A" . "ll right" . "s reserv" . "ed.";
     $this->_fontNames[Zend_Pdf_Font::NAME_FAMILY]['en'] = "Symbol";
     $this->_fontNames[Zend_Pdf_Font::NAME_STYLE]['en'] = "Medium";
     $this->_fontNames[Zend_Pdf_Font::NAME_ID]['en'] = "43064";
     $this->_fontNames[Zend_Pdf_Font::NAME_FULL]['en'] = "Symbol M" . "edium";
     $this->_fontNames[Zend_Pdf_Font::NAME_VERSION]['en'] = "001.008";
     $this->_fontNames[Zend_Pdf_Font::NAME_POSTSCRIPT]['en'] = "Symbol";
     $this->_isBold = false;
     $this->_isItalic = false;
     $this->_isMonospaced = false;
     $this->_underlinePosition = -100;
     $this->_underlineThickness = 50;
     $this->_strikePosition = 225;
     $this->_strikeThickness = 50;
     $this->_unitsPerEm = 1000;
     $this->_ascent = 1000;
     $this->_descent = 0;
     $this->_lineGap = 200;
     /* The glyph numbers assigned here are synthetic; they do not match the
      * actual glyph numbers used by the font. This is not a big deal though
      * since this data never makes it to the PDF file. It is only used
      * internally for layout calculations.
      */
     $this->_glyphWidths = array(0x0 => 0x1f4, 0x1 => 0xfa, 0x2 => 0x14d, 0x3 => 0x2c9, 0x4 => 0x1f4, 0x5 => 0x225, 0x6 => 0x341, 0x7 => 0x30a, 0x8 => 0x1b7, 0x9 => 0x14d, 0xa => 0x14d, 0xb => 0x1f4, 0xc => 0x225, 0xd => 0xfa, 0xe => 0x225, 0xf => 0xfa, 0x10 => 0x116, 0x11 => 0x1f4, 0x12 => 0x1f4, 0x13 => 0x1f4, 0x14 => 0x1f4, 0x15 => 0x1f4, 0x16 => 0x1f4, 0x17 => 0x1f4, 0x18 => 0x1f4, 0x19 => 0x1f4, 0x1a => 0x1f4, 0x1b => 0x116, 0x1c => 0x116, 0x1d => 0x225, 0x1e => 0x225, 0x1f => 0x225, 0x20 => 0x1bc, 0x21 => 0x225, 0x22 => 0x2d2, 0x23 => 0x29b, 0x24 => 0x2d2, 0x25 => 0x264, 0x26 => 0x263, 0x27 => 0x2fb, 0x28 => 0x25b, 0x29 => 0x2d2, 0x2a => 0x14d, 0x2b => 0x277, 0x2c => 0x2d2, 0x2d => 0x2ae, 0x2e => 0x379, 0x2f => 0x2d2, 0x30 => 0x2d2, 0x31 => 0x300, 0x32 => 0x2e5, 0x33 => 0x22c, 0x34 => 0x250, 0x35 => 0x263, 0x36 => 0x2b2, 0x37 => 0x1b7, 0x38 => 0x300, 0x39 => 0x285, 0x3a => 0x31b, 0x3b => 0x263, 0x3c => 0x14d, 0x3d => 0x35f, 0x3e => 0x14d, 0x3f => 0x292, 0x40 => 0x1f4, 0x41 => 0x1f4, 0x42 => 0x277, 0x43 => 0x225, 0x44 => 0x225, 0x45 => 0x1ee, 0x46 => 0x1b7, 0x47 => 0x209, 0x48 => 0x19b, 0x49 => 0x25b, 0x4a => 0x149, 0x4b => 0x25b, 0x4c => 0x225, 0x4d => 0x225, 0x4e => 0x240, 0x4f => 0x209, 0x50 => 0x225, 0x51 => 0x225, 0x52 => 0x209, 0x53 => 0x225, 0x54 => 0x25b, 0x55 => 0x1b7, 0x56 => 0x240, 0x57 => 0x2c9, 0x58 => 0x2ae, 0x59 => 0x1ed, 0x5a => 0x2ae, 0x5b => 0x1ee, 0x5c => 0x1e0, 0x5d => 0xc8, 0x5e => 0x1e0, 0x5f => 0x225, 0x60 => 0x2ee, 0x61 => 0x26c, 0x62 => 0xf7, 0x63 => 0x225, 0x64 => 0xa7, 0x65 => 0x2c9, 0x66 => 0x1f4, 0x67 => 0x2f1, 0x68 => 0x2f1, 0x69 => 0x2f1, 0x6a => 0x2f1, 0x6b => 0x412, 0x6c => 0x3db, 0x6d => 0x25b, 0x6e => 0x3db, 0x6f => 0x25b, 0x70 => 0x190, 0x71 => 0x225, 0x72 => 0x19b, 0x73 => 0x225, 0x74 => 0x225, 0x75 => 0x2c9, 0x76 => 0x1ee, 0x77 => 0x1cc, 0x78 => 0x225, 0x79 => 0x225, 0x7a => 0x225, 0x7b => 0x225, 0x7c => 0x3e8, 0x7d => 0x25b, 0x7e => 0x3e8, 0x7f => 0x292, 0x80 => 0x337, 0x81 => 0x2ae, 0x82 => 0x31b, 0x83 => 0x3db, 0x84 => 0x300, 0x85 => 0x300, 0x86 => 0x337, 0x87 => 0x300, 0x88 => 0x300, 0x89 => 0x2c9, 0x8a => 0x2c9, 0x8b => 0x2c9, 0x8c => 0x2c9, 0x8d => 0x2c9, 0x8e => 0x2c9, 0x8f => 0x2c9, 0x90 => 0x300, 0x91 => 0x2c9, 0x92 => 0x316, 0x93 => 0x316, 0x94 => 0x37a, 0x95 => 0x337, 0x96 => 0x225, 0x97 => 0xfa, 0x98 => 0x2c9, 0x99 => 0x25b, 0x9a => 0x25b, 0x9b => 0x412, 0x9c => 0x3db, 0x9d => 0x25b, 0x9e => 0x3db, 0x9f => 0x25b, 0xa0 => 0x1ee, 0xa1 => 0x149, 0xa2 => 0x316, 0xa3 => 0x316, 0xa4 => 0x312, 0xa5 => 0x2c9, 0xa6 => 0x180, 0xa7 => 0x180, 0xa8 => 0x180, 0xa9 => 0x180, 0xaa => 0x180, 0xab => 0x180, 0xac => 0x1ee, 0xad => 0x1ee, 0xae => 0x1ee, 0xaf => 0x1ee, 0xb0 => 0x149, 0xb1 => 0x112, 0xb2 => 0x2ae, 0xb3 => 0x2ae, 0xb4 => 0x2ae, 0xb5 => 0x180, 0xb6 => 0x180, 0xb7 => 0x180, 0xb8 => 0x180, 0xb9 => 0x180, 0xba => 0x180, 0xbb => 0x1ee, 0xbc => 0x1ee, 0xbd => 0x1ee, 0xbe => 0x316);
     $this->_glyphMaxIndex = 190;
     /* The cmap table is similarly synthesized.
      */
     $cmapData = array(0x20 => 0x1, 0x21 => 0x2, 0x2200 => 0x3, 0x23 => 0x4, 0x2203 => 0x5, 0x25 => 0x6, 0x26 => 0x7, 0x220b => 0x8, 0x28 => 0x9, 0x29 => 0xa, 0x2217 => 0xb, 0x2b => 0xc, 0x2c => 0xd, 0x2212 => 0xe, 0x2e => 0xf, 0x2f => 0x10, 0x30 => 0x11, 0x31 => 0x12, 0x32 => 0x13, 0x33 => 0x14, 0x34 => 0x15, 0x35 => 0x16, 0x36 => 0x17, 0x37 => 0x18, 0x38 => 0x19, 0x39 => 0x1a, 0x3a => 0x1b, 0x3b => 0x1c, 0x3c => 0x1d, 0x3d => 0x1e, 0x3e => 0x1f, 0x3f => 0x20, 0x2245 => 0x21, 0x391 => 0x22, 0x392 => 0x23, 0x3a7 => 0x24, 0x2206 => 0x25, 0x395 => 0x26, 0x3a6 => 0x27, 0x393 => 0x28, 0x397 => 0x29, 0x399 => 0x2a, 0x3d1 => 0x2b, 0x39a => 0x2c, 0x39b => 0x2d, 0x39c => 0x2e, 0x39d => 0x2f, 0x39f => 0x30, 0x3a0 => 0x31, 0x398 => 0x32, 0x3a1 => 0x33, 0x3a3 => 0x34, 0x3a4 => 0x35, 0x3a5 => 0x36, 0x3c2 => 0x37, 0x2126 => 0x38, 0x39e => 0x39, 0x3a8 => 0x3a, 0x396 => 0x3b, 0x5b => 0x3c, 0x2234 => 0x3d, 0x5d => 0x3e, 0x22a5 => 0x3f, 0x5f => 0x40, 0xf8e5 => 0x41, 0x3b1 => 0x42, 0x3b2 => 0x43, 0x3c7 => 0x44, 0x3b4 => 0x45, 0x3b5 => 0x46, 0x3c6 => 0x47, 0x3b3 => 0x48, 0x3b7 => 0x49, 0x3b9 => 0x4a, 0x3d5 => 0x4b, 0x3ba => 0x4c, 0x3bb => 0x4d, 0xb5 => 0x4e, 0x3bd => 0x4f, 0x3bf => 0x50, 0x3c0 => 0x51, 0x3b8 => 0x52, 0x3c1 => 0x53, 0x3c3 => 0x54, 0x3c4 => 0x55, 0x3c5 => 0x56, 0x3d6 => 0x57, 0x3c9 => 0x58, 0x3be => 0x59, 0x3c8 => 0x5a, 0x3b6 => 0x5b, 0x7b => 0x5c, 0x7c => 0x5d, 0x7d => 0x5e, 0x223c => 0x5f, 0x20ac => 0x60, 0x3d2 => 0x61, 0x2032 => 0x62, 0x2264 => 0x63, 0x2044 => 0x64, 0x221e => 0x65, 0x192 => 0x66, 0x2663 => 0x67, 0x2666 => 0x68, 0x2665 => 0x69, 0x2660 => 0x6a, 0x2194 => 0x6b, 0x2190 => 0x6c, 0x2191 => 0x6d, 0x2192 => 0x6e, 0x2193 => 0x6f, 0xb0 => 0x70, 0xb1 => 0x71, 0x2033 => 0x72, 0x2265 => 0x73, 0xd7 => 0x74, 0x221d => 0x75, 0x2202 => 0x76, 0x2022 => 0x77, 0xf7 => 0x78, 0x2260 => 0x79, 0x2261 => 0x7a, 0x2248 => 0x7b, 0x2026 => 0x7c, 0xf8e6 => 0x7d, 0xf8e7 => 0x7e, 0x21b5 => 0x7f, 0x2135 => 0x80, 0x2111 => 0x81, 0x211c => 0x82, 0x2118 => 0x83, 0x2297 => 0x84, 0x2295 => 0x85, 0x2205 => 0x86, 0x2229 => 0x87, 0x222a => 0x88, 0x2283 => 0x89, 0x2287 => 0x8a, 0x2284 => 0x8b, 0x2282 => 0x8c, 0x2286 => 0x8d, 0x2208 => 0x8e, 0x2209 => 0x8f, 0x2220 => 0x90, 0x2207 => 0x91, 0xf6da => 0x92, 0xf6d9 => 0x93, 0xf6db => 0x94, 0x220f => 0x95, 0x221a => 0x96, 0x22c5 => 0x97, 0xac => 0x98, 0x2227 => 0x99, 0x2228 => 0x9a, 0x21d4 => 0x9b, 0x21d0 => 0x9c, 0x21d1 => 0x9d, 0x21d2 => 0x9e, 0x21d3 => 0x9f, 0x25ca => 0xa0, 0x2329 => 0xa1, 0xf8e8 => 0xa2, 0xf8e9 => 0xa3, 0xf8ea => 0xa4, 0x2211 => 0xa5, 0xf8eb => 0xa6, 0xf8ec => 0xa7, 0xf8ed => 0xa8, 0xf8ee => 0xa9, 0xf8ef => 0xaa, 0xf8f0 => 0xab, 0xf8f1 => 0xac, 0xf8f2 => 0xad, 0xf8f3 => 0xae, 0xf8f4 => 0xaf, 0x232a => 0xb0, 0x222b => 0xb1, 0x2320 => 0xb2, 0xf8f5 => 0xb3, 0x2321 => 0xb4, 0xf8f6 => 0xb5, 0xf8f7 => 0xb6, 0xf8f8 => 0xb7, 0xf8f9 => 0xb8, 0xf8fa => 0xb9, 0xf8fb => 0xba, 0xf8fc => 0xbb, 0xf8fd => 0xbc, 0xf8fe => 0xbd, 0xf8ff => 0xbe);
     $this->cmap = Zend_Pdf_Cmap::cmapWithTypeData(Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
     /* Resource dictionary */
     /* The resource dictionary for the standard fonts is sparse because PDF
      * viewers already have all of the metrics data. We only need to provide
      * the font name and encoding method.
      */
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name('Symbol');
     /* This font has a built-in custom character encoding method. Don't
      * override with WinAnsi like the other built-in fonts or else it will
      * not work as expected.
      */
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:52,代码来源:Symbol.php

示例5: __construct

 /**
  * Object constructor
  */
 public function __construct()
 {
     parent::__construct();
     /* Object properties */
     /* The font names are stored internally as Unicode UTF-16BE-encoded
      * strings. Since this information is static, save unnecessary trips
      * through iconv() and just use pre-encoded hexidecimal strings.
      */
     $this->_fontNames[Zend_Pdf_Font::NAME_COPYRIGHT]['en'] = "Copyrigh" . "t (c) 19" . "85, 1987" . ", 1988, " . "1989, 19" . "97 Adobe" . " Systems" . " Incorpo" . "rated. A" . "ll Right" . "s Reserv" . "ed.ITC Z" . "apf Ding" . "bats is " . "a regist" . "ered tra" . "demark o" . "f Intern" . "ational " . "Typeface" . " Corpora" . "tion.";
     $this->_fontNames[Zend_Pdf_Font::NAME_FAMILY]['en'] = "ZapfDing" . "bats";
     $this->_fontNames[Zend_Pdf_Font::NAME_STYLE]['en'] = "Medium";
     $this->_fontNames[Zend_Pdf_Font::NAME_ID]['en'] = "43082";
     $this->_fontNames[Zend_Pdf_Font::NAME_FULL]['en'] = "ZapfDing" . "bats Med" . "ium";
     $this->_fontNames[Zend_Pdf_Font::NAME_VERSION]['en'] = "002.000";
     $this->_fontNames[Zend_Pdf_Font::NAME_POSTSCRIPT]['en'] = "ZapfDing" . "bats";
     $this->_isBold = false;
     $this->_isItalic = false;
     $this->_isMonospaced = false;
     $this->_underlinePosition = -100;
     $this->_underlineThickness = 50;
     $this->_strikePosition = 225;
     $this->_strikeThickness = 50;
     $this->_unitsPerEm = 1000;
     $this->_ascent = 1000;
     $this->_descent = 0;
     $this->_lineGap = 200;
     /* The glyph numbers assigned here are synthetic; they do not match the
      * actual glyph numbers used by the font. This is not a big deal though
      * since this data never makes it to the PDF file. It is only used
      * internally for layout calculations.
      */
     $this->_glyphWidths = array(0x0 => 0x1f4, 0x1 => 0x116, 0x2 => 0x3ce, 0x3 => 0x3c1, 0x4 => 0x3ce, 0x5 => 0x3d4, 0x6 => 0x2cf, 0x7 => 0x315, 0x8 => 0x316, 0x9 => 0x317, 0xa => 0x2b2, 0xb => 0x3c0, 0xc => 0x3ab, 0xd => 0x225, 0xe => 0x357, 0xf => 0x38f, 0x10 => 0x3a5, 0x11 => 0x38f, 0x12 => 0x3b1, 0x13 => 0x3ce, 0x14 => 0x2f3, 0x15 => 0x34e, 0x16 => 0x2fa, 0x17 => 0x2f9, 0x18 => 0x23b, 0x19 => 0x2a5, 0x1a => 0x2fb, 0x1b => 0x2f8, 0x1c => 0x2f7, 0x1d => 0x2f2, 0x1e => 0x1ee, 0x1f => 0x228, 0x20 => 0x219, 0x21 => 0x241, 0x22 => 0x2b4, 0x23 => 0x312, 0x24 => 0x314, 0x25 => 0x314, 0x26 => 0x316, 0x27 => 0x319, 0x28 => 0x31a, 0x29 => 0x330, 0x2a => 0x337, 0x2b => 0x315, 0x2c => 0x349, 0x2d => 0x337, 0x2e => 0x341, 0x2f => 0x330, 0x30 => 0x33f, 0x31 => 0x39b, 0x32 => 0x2e8, 0x33 => 0x2d3, 0x34 => 0x2ed, 0x35 => 0x316, 0x36 => 0x318, 0x37 => 0x2b7, 0x38 => 0x308, 0x39 => 0x300, 0x3a => 0x318, 0x3b => 0x2f7, 0x3c => 0x2c3, 0x3d => 0x2c4, 0x3e => 0x2aa, 0x3f => 0x2bd, 0x40 => 0x33a, 0x41 => 0x32f, 0x42 => 0x315, 0x43 => 0x315, 0x44 => 0x2c3, 0x45 => 0x2af, 0x46 => 0x2b8, 0x47 => 0x2b1, 0x48 => 0x312, 0x49 => 0x313, 0x4a => 0x2c9, 0x4b => 0x317, 0x4c => 0x311, 0x4d => 0x317, 0x4e => 0x369, 0x4f => 0x2f9, 0x50 => 0x2fa, 0x51 => 0x2fa, 0x52 => 0x2f7, 0x53 => 0x2f7, 0x54 => 0x37c, 0x55 => 0x37c, 0x56 => 0x314, 0x57 => 0x310, 0x58 => 0x1b6, 0x59 => 0x8a, 0x5a => 0x115, 0x5b => 0x19f, 0x5c => 0x188, 0x5d => 0x188, 0x5e => 0x29c, 0x5f => 0x29c, 0x60 => 0x186, 0x61 => 0x186, 0x62 => 0x13d, 0x63 => 0x13d, 0x64 => 0x114, 0x65 => 0x114, 0x66 => 0x1fd, 0x67 => 0x1fd, 0x68 => 0x19a, 0x69 => 0x19a, 0x6a => 0xea, 0x6b => 0xea, 0x6c => 0x14e, 0x6d => 0x14e, 0x6e => 0x2dc, 0x6f => 0x220, 0x70 => 0x220, 0x71 => 0x38e, 0x72 => 0x29b, 0x73 => 0x2f8, 0x74 => 0x2f8, 0x75 => 0x308, 0x76 => 0x253, 0x77 => 0x2b6, 0x78 => 0x272, 0x79 => 0x314, 0x7a => 0x314, 0x7b => 0x314, 0x7c => 0x314, 0x7d => 0x314, 0x7e => 0x314, 0x7f => 0x314, 0x80 => 0x314, 0x81 => 0x314, 0x82 => 0x314, 0x83 => 0x314, 0x84 => 0x314, 0x85 => 0x314, 0x86 => 0x314, 0x87 => 0x314, 0x88 => 0x314, 0x89 => 0x314, 0x8a => 0x314, 0x8b => 0x314, 0x8c => 0x314, 0x8d => 0x314, 0x8e => 0x314, 0x8f => 0x314, 0x90 => 0x314, 0x91 => 0x314, 0x92 => 0x314, 0x93 => 0x314, 0x94 => 0x314, 0x95 => 0x314, 0x96 => 0x314, 0x97 => 0x314, 0x98 => 0x314, 0x99 => 0x314, 0x9a => 0x314, 0x9b => 0x314, 0x9c => 0x314, 0x9d => 0x314, 0x9e => 0x314, 0x9f => 0x314, 0xa0 => 0x314, 0xa1 => 0x37e, 0xa2 => 0x346, 0xa3 => 0x3f8, 0xa4 => 0x1ca, 0xa5 => 0x2ec, 0xa6 => 0x39c, 0xa7 => 0x2ec, 0xa8 => 0x396, 0xa9 => 0x39f, 0xaa => 0x3a0, 0xab => 0x3a0, 0xac => 0x342, 0xad => 0x369, 0xae => 0x33c, 0xaf => 0x39c, 0xb0 => 0x39c, 0xb1 => 0x395, 0xb2 => 0x3a2, 0xb3 => 0x3a3, 0xb4 => 0x1cf, 0xb5 => 0x373, 0xb6 => 0x344, 0xb7 => 0x344, 0xb8 => 0x363, 0xb9 => 0x363, 0xba => 0x2b8, 0xbb => 0x2b8, 0xbc => 0x36a, 0xbd => 0x36a, 0xbe => 0x2f8, 0xbf => 0x3b2, 0xc0 => 0x303, 0xc1 => 0x361, 0xc2 => 0x303, 0xc3 => 0x378, 0xc4 => 0x3c7, 0xc5 => 0x378, 0xc6 => 0x33f, 0xc7 => 0x369, 0xc8 => 0x39f, 0xc9 => 0x3ca, 0xca => 0x396);
     /* The cmap table is similarly synthesized.
      */
     $cmapData = array(0x20 => 0x1, 0x2701 => 0x2, 0x2702 => 0x3, 0x2703 => 0x4, 0x2704 => 0x5, 0x260e => 0x6, 0x2706 => 0x7, 0x2707 => 0x8, 0x2708 => 0x9, 0x2709 => 0xa, 0x261b => 0xb, 0x261e => 0xc, 0x270c => 0xd, 0x270d => 0xe, 0x270e => 0xf, 0x270f => 0x10, 0x2710 => 0x11, 0x2711 => 0x12, 0x2712 => 0x13, 0x2713 => 0x14, 0x2714 => 0x15, 0x2715 => 0x16, 0x2716 => 0x17, 0x2717 => 0x18, 0x2718 => 0x19, 0x2719 => 0x1a, 0x271a => 0x1b, 0x271b => 0x1c, 0x271c => 0x1d, 0x271d => 0x1e, 0x271e => 0x1f, 0x271f => 0x20, 0x2720 => 0x21, 0x2721 => 0x22, 0x2722 => 0x23, 0x2723 => 0x24, 0x2724 => 0x25, 0x2725 => 0x26, 0x2726 => 0x27, 0x2727 => 0x28, 0x2605 => 0x29, 0x2729 => 0x2a, 0x272a => 0x2b, 0x272b => 0x2c, 0x272c => 0x2d, 0x272d => 0x2e, 0x272e => 0x2f, 0x272f => 0x30, 0x2730 => 0x31, 0x2731 => 0x32, 0x2732 => 0x33, 0x2733 => 0x34, 0x2734 => 0x35, 0x2735 => 0x36, 0x2736 => 0x37, 0x2737 => 0x38, 0x2738 => 0x39, 0x2739 => 0x3a, 0x273a => 0x3b, 0x273b => 0x3c, 0x273c => 0x3d, 0x273d => 0x3e, 0x273e => 0x3f, 0x273f => 0x40, 0x2740 => 0x41, 0x2741 => 0x42, 0x2742 => 0x43, 0x2743 => 0x44, 0x2744 => 0x45, 0x2745 => 0x46, 0x2746 => 0x47, 0x2747 => 0x48, 0x2748 => 0x49, 0x2749 => 0x4a, 0x274a => 0x4b, 0x274b => 0x4c, 0x25cf => 0x4d, 0x274d => 0x4e, 0x25a0 => 0x4f, 0x274f => 0x50, 0x2750 => 0x51, 0x2751 => 0x52, 0x2752 => 0x53, 0x25b2 => 0x54, 0x25bc => 0x55, 0x25c6 => 0x56, 0x2756 => 0x57, 0x25d7 => 0x58, 0x2758 => 0x59, 0x2759 => 0x5a, 0x275a => 0x5b, 0x275b => 0x5c, 0x275c => 0x5d, 0x275d => 0x5e, 0x275e => 0x5f, 0x2768 => 0x60, 0x2769 => 0x61, 0x276a => 0x62, 0x276b => 0x63, 0x276c => 0x64, 0x276d => 0x65, 0x276e => 0x66, 0x276f => 0x67, 0x2770 => 0x68, 0x2771 => 0x69, 0x2772 => 0x6a, 0x2773 => 0x6b, 0x2774 => 0x6c, 0x2775 => 0x6d, 0x2761 => 0x6e, 0x2762 => 0x6f, 0x2763 => 0x70, 0x2764 => 0x71, 0x2765 => 0x72, 0x2766 => 0x73, 0x2767 => 0x74, 0x2663 => 0x75, 0x2666 => 0x76, 0x2665 => 0x77, 0x2660 => 0x78, 0x2460 => 0x79, 0x2461 => 0x7a, 0x2462 => 0x7b, 0x2463 => 0x7c, 0x2464 => 0x7d, 0x2465 => 0x7e, 0x2466 => 0x7f, 0x2467 => 0x80, 0x2468 => 0x81, 0x2469 => 0x82, 0x2776 => 0x83, 0x2777 => 0x84, 0x2778 => 0x85, 0x2779 => 0x86, 0x277a => 0x87, 0x277b => 0x88, 0x277c => 0x89, 0x277d => 0x8a, 0x277e => 0x8b, 0x277f => 0x8c, 0x2780 => 0x8d, 0x2781 => 0x8e, 0x2782 => 0x8f, 0x2783 => 0x90, 0x2784 => 0x91, 0x2785 => 0x92, 0x2786 => 0x93, 0x2787 => 0x94, 0x2788 => 0x95, 0x2789 => 0x96, 0x278a => 0x97, 0x278b => 0x98, 0x278c => 0x99, 0x278d => 0x9a, 0x278e => 0x9b, 0x278f => 0x9c, 0x2790 => 0x9d, 0x2791 => 0x9e, 0x2792 => 0x9f, 0x2793 => 0xa0, 0x2794 => 0xa1, 0x2192 => 0xa2, 0x2194 => 0xa3, 0x2195 => 0xa4, 0x2798 => 0xa5, 0x2799 => 0xa6, 0x279a => 0xa7, 0x279b => 0xa8, 0x279c => 0xa9, 0x279d => 0xaa, 0x279e => 0xab, 0x279f => 0xac, 0x27a0 => 0xad, 0x27a1 => 0xae, 0x27a2 => 0xaf, 0x27a3 => 0xb0, 0x27a4 => 0xb1, 0x27a5 => 0xb2, 0x27a6 => 0xb3, 0x27a7 => 0xb4, 0x27a8 => 0xb5, 0x27a9 => 0xb6, 0x27aa => 0xb7, 0x27ab => 0xb8, 0x27ac => 0xb9, 0x27ad => 0xba, 0x27ae => 0xbb, 0x27af => 0xbc, 0x27b1 => 0xbd, 0x27b2 => 0xbe, 0x27b3 => 0xbf, 0x27b4 => 0xc0, 0x27b5 => 0xc1, 0x27b6 => 0xc2, 0x27b7 => 0xc3, 0x27b8 => 0xc4, 0x27b9 => 0xc5, 0x27ba => 0xc6, 0x27bb => 0xc7, 0x27bc => 0xc8, 0x27bd => 0xc9, 0x27be => 0xca);
     require_once 'Zend/Pdf/Cmap.php';
     $this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
     /* Resource dictionary */
     /* The resource dictionary for the standard fonts is sparse because PDF
      * viewers already have all of the metrics data. We only need to provide
      * the font name and encoding method.
      */
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name('ZapfDingbats');
     /* This font has a built-in custom character encoding method. Don't
      * override with WinAnsi like the other built-in fonts or else it will
      * not work as expected.
      */
     $this->_resource->Encoding = null;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:52,代码来源:ZapfDingbats.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_fontNames[Zend_Pdf_Font::NAME_COPYRIGHT]['en'] = "Copyrigh" . "t (c) 19" . "89, 1990" . ", 1991, " . "1992, 19" . "93, 1997" . " Adobe S" . "ystems I" . "ncorpora" . "ted.  Al" . "l Rights" . " Reserve" . "d.";
     $this->_fontNames[Zend_Pdf_Font::NAME_FAMILY]['en'] = "Courier";
     $this->_fontNames[Zend_Pdf_Font::NAME_STYLE]['en'] = "Medium";
     $this->_fontNames[Zend_Pdf_Font::NAME_ID]['en'] = "43051";
     $this->_fontNames[Zend_Pdf_Font::NAME_FULL]['en'] = "Courier-" . "Oblique " . "Medium";
     $this->_fontNames[Zend_Pdf_Font::NAME_VERSION]['en'] = "003.000";
     $this->_fontNames[Zend_Pdf_Font::NAME_POSTSCRIPT]['en'] = "Courier-" . "Oblique";
     $this->_isBold = false;
     $this->_isItalic = true;
     $this->_isMonospaced = true;
     $this->_underlinePosition = -100;
     $this->_underlineThickness = 50;
     $this->_strikePosition = 225;
     $this->_strikeThickness = 50;
     $this->_unitsPerEm = 1000;
     $this->_ascent = 629;
     $this->_descent = -157;
     $this->_lineGap = 414;
     $this->_glyphWidths = array(0x0 => 0x1f4, 0x1 => 0x258, 0x2 => 0x258, 0x3 => 0x258, 0x4 => 0x258, 0x5 => 0x258, 0x6 => 0x258, 0x7 => 0x258, 0x8 => 0x258, 0x9 => 0x258, 0xa => 0x258, 0xb => 0x258, 0xc => 0x258, 0xd => 0x258, 0xe => 0x258, 0xf => 0x258, 0x10 => 0x258, 0x11 => 0x258, 0x12 => 0x258, 0x13 => 0x258, 0x14 => 0x258, 0x15 => 0x258, 0x16 => 0x258, 0x17 => 0x258, 0x18 => 0x258, 0x19 => 0x258, 0x1a => 0x258, 0x1b => 0x258, 0x1c => 0x258, 0x1d => 0x258, 0x1e => 0x258, 0x1f => 0x258, 0x20 => 0x258, 0x21 => 0x258, 0x22 => 0x258, 0x23 => 0x258, 0x24 => 0x258, 0x25 => 0x258, 0x26 => 0x258, 0x27 => 0x258, 0x28 => 0x258, 0x29 => 0x258, 0x2a => 0x258, 0x2b => 0x258, 0x2c => 0x258, 0x2d => 0x258, 0x2e => 0x258, 0x2f => 0x258, 0x30 => 0x258, 0x31 => 0x258, 0x32 => 0x258, 0x33 => 0x258, 0x34 => 0x258, 0x35 => 0x258, 0x36 => 0x258, 0x37 => 0x258, 0x38 => 0x258, 0x39 => 0x258, 0x3a => 0x258, 0x3b => 0x258, 0x3c => 0x258, 0x3d => 0x258, 0x3e => 0x258, 0x3f => 0x258, 0x40 => 0x258, 0x41 => 0x258, 0x42 => 0x258, 0x43 => 0x258, 0x44 => 0x258, 0x45 => 0x258, 0x46 => 0x258, 0x47 => 0x258, 0x48 => 0x258, 0x49 => 0x258, 0x4a => 0x258, 0x4b => 0x258, 0x4c => 0x258, 0x4d => 0x258, 0x4e => 0x258, 0x4f => 0x258, 0x50 => 0x258, 0x51 => 0x258, 0x52 => 0x258, 0x53 => 0x258, 0x54 => 0x258, 0x55 => 0x258, 0x56 => 0x258, 0x57 => 0x258, 0x58 => 0x258, 0x59 => 0x258, 0x5a => 0x258, 0x5b => 0x258, 0x5c => 0x258, 0x5d => 0x258, 0x5e => 0x258, 0x5f => 0x258, 0x60 => 0x258, 0x61 => 0x258, 0x62 => 0x258, 0x63 => 0x258, 0x64 => 0x258, 0x65 => 0x258, 0x66 => 0x258, 0x67 => 0x258, 0x68 => 0x258, 0x69 => 0x258, 0x6a => 0x258, 0x6b => 0x258, 0x6c => 0x258, 0x6d => 0x258, 0x6e => 0x258, 0x6f => 0x258, 0x70 => 0x258, 0x71 => 0x258, 0x72 => 0x258, 0x73 => 0x258, 0x74 => 0x258, 0x75 => 0x258, 0x76 => 0x258, 0x77 => 0x258, 0x78 => 0x258, 0x79 => 0x258, 0x7a => 0x258, 0x7b => 0x258, 0x7c => 0x258, 0x7d => 0x258, 0x7e => 0x258, 0x7f => 0x258, 0x80 => 0x258, 0x81 => 0x258, 0x82 => 0x258, 0x83 => 0x258, 0x84 => 0x258, 0x85 => 0x258, 0x86 => 0x258, 0x87 => 0x258, 0x88 => 0x258, 0x89 => 0x258, 0x8a => 0x258, 0x8b => 0x258, 0x8c => 0x258, 0x8d => 0x258, 0x8e => 0x258, 0x8f => 0x258, 0x90 => 0x258, 0x91 => 0x258, 0x92 => 0x258, 0x93 => 0x258, 0x94 => 0x258, 0x95 => 0x258, 0x96 => 0x258, 0x97 => 0x258, 0x98 => 0x258, 0x99 => 0x258, 0x9a => 0x258, 0x9b => 0x258, 0x9c => 0x258, 0x9d => 0x258, 0x9e => 0x258, 0x9f => 0x258, 0xa0 => 0x258, 0xa1 => 0x258, 0xa2 => 0x258, 0xa3 => 0x258, 0xa4 => 0x258, 0xa5 => 0x258, 0xa6 => 0x258, 0xa7 => 0x258, 0xa8 => 0x258, 0xa9 => 0x258, 0xaa => 0x258, 0xab => 0x258, 0xac => 0x258, 0xad => 0x258, 0xae => 0x258, 0xaf => 0x258, 0xb0 => 0x258, 0xb1 => 0x258, 0xb2 => 0x258, 0xb3 => 0x258, 0xb4 => 0x258, 0xb5 => 0x258, 0xb6 => 0x258, 0xb7 => 0x258, 0xb8 => 0x258, 0xb9 => 0x258, 0xba => 0x258, 0xbb => 0x258, 0xbc => 0x258, 0xbd => 0x258, 0xbe => 0x258, 0xbf => 0x258, 0xc0 => 0x258, 0xc1 => 0x258, 0xc2 => 0x258, 0xc3 => 0x258, 0xc4 => 0x258, 0xc5 => 0x258, 0xc6 => 0x258, 0xc7 => 0x258, 0xc8 => 0x258, 0xc9 => 0x258, 0xca => 0x258, 0xcb => 0x258, 0xcc => 0x258, 0xcd => 0x258, 0xce => 0x258, 0xcf => 0x258, 0xd0 => 0x258, 0xd1 => 0x258, 0xd2 => 0x258, 0xd3 => 0x258, 0xd4 => 0x258, 0xd5 => 0x258, 0xd6 => 0x258, 0xd7 => 0x258, 0xd8 => 0x258, 0xd9 => 0x258, 0xda => 0x258, 0xdb => 0x258, 0xdc => 0x258, 0xdd => 0x258, 0xde => 0x258, 0xdf => 0x258, 0xe0 => 0x258, 0xe1 => 0x258, 0xe2 => 0x258, 0xe3 => 0x258, 0xe4 => 0x258, 0xe5 => 0x258, 0xe6 => 0x258, 0xe7 => 0x258, 0xe8 => 0x258, 0xe9 => 0x258, 0xea => 0x258, 0xeb => 0x258, 0xec => 0x258, 0xed => 0x258, 0xee => 0x258, 0xef => 0x258, 0xf0 => 0x258, 0xf1 => 0x258, 0xf2 => 0x258, 0xf3 => 0x258, 0xf4 => 0x258, 0xf5 => 0x258, 0xf6 => 0x258, 0xf7 => 0x258, 0xf8 => 0x258, 0xf9 => 0x258, 0xfa => 0x258, 0xfb => 0x258, 0xfc => 0x258, 0xfd => 0x258, 0xfe => 0x258, 0xff => 0x258, 0x100 => 0x258, 0x101 => 0x258, 0x102 => 0x258, 0x103 => 0x258, 0x104 => 0x258, 0x105 => 0x258, 0x106 => 0x258, 0x107 => 0x258, 0x108 => 0x258, 0x109 => 0x258, 0x10a => 0x258, 0x10b => 0x258, 0x10c => 0x258, 0x10d => 0x258, 0x10e => 0x258, 0x10f => 0x258, 0x110 => 0x258, 0x111 => 0x258, 0x112 => 0x258, 0x113 => 0x258, 0x114 => 0x258, 0x115 => 0x258, 0x116 => 0x258, 0x117 => 0x258, 0x118 => 0x258, 0x119 => 0x258, 0x11a => 0x258, 0x11b => 0x258, 0x11c => 0x258, 0x11d => 0x258, 0x11e => 0x258, 0x11f => 0x258, 0x120 => 0x258, 0x121 => 0x258, 0x122 => 0x258, 0x123 => 0x258, 0x124 => 0x258, 0x125 => 0x258, 0x126 => 0x258, 0x127 => 0x258, 0x128 => 0x258, 0x129 => 0x258, 0x12a => 0x258, 0x12b => 0x258, 0x12c => 0x258, 0x12d => 0x258, 0x12e => 0x258, 0x12f => 0x258, 0x130 => 0x258, 0x131 => 0x258, 0x132 => 0x258, 0x133 => 0x258, 0x134 => 0x258, 0x135 => 0x258, 0x136 => 0x258, 0x137 => 0x258, 0x138 => 0x258, 0x139 => 0x258, 0x13a => 0x258, 0x13b => 0x258);
     $cmapData = array(0x20 => 0x1, 0x21 => 0x2, 0x22 => 0x3, 0x23 => 0x4, 0x24 => 0x5, 0x25 => 0x6, 0x26 => 0x7, 0x2019 => 0x8, 0x28 => 0x9, 0x29 => 0xa, 0x2a => 0xb, 0x2b => 0xc, 0x2c => 0xd, 0x2d => 0xe, 0x2e => 0xf, 0x2f => 0x10, 0x30 => 0x11, 0x31 => 0x12, 0x32 => 0x13, 0x33 => 0x14, 0x34 => 0x15, 0x35 => 0x16, 0x36 => 0x17, 0x37 => 0x18, 0x38 => 0x19, 0x39 => 0x1a, 0x3a => 0x1b, 0x3b => 0x1c, 0x3c => 0x1d, 0x3d => 0x1e, 0x3e => 0x1f, 0x3f => 0x20, 0x40 => 0x21, 0x41 => 0x22, 0x42 => 0x23, 0x43 => 0x24, 0x44 => 0x25, 0x45 => 0x26, 0x46 => 0x27, 0x47 => 0x28, 0x48 => 0x29, 0x49 => 0x2a, 0x4a => 0x2b, 0x4b => 0x2c, 0x4c => 0x2d, 0x4d => 0x2e, 0x4e => 0x2f, 0x4f => 0x30, 0x50 => 0x31, 0x51 => 0x32, 0x52 => 0x33, 0x53 => 0x34, 0x54 => 0x35, 0x55 => 0x36, 0x56 => 0x37, 0x57 => 0x38, 0x58 => 0x39, 0x59 => 0x3a, 0x5a => 0x3b, 0x5b => 0x3c, 0x5c => 0x3d, 0x5d => 0x3e, 0x5e => 0x3f, 0x5f => 0x40, 0x2018 => 0x41, 0x61 => 0x42, 0x62 => 0x43, 0x63 => 0x44, 0x64 => 0x45, 0x65 => 0x46, 0x66 => 0x47, 0x67 => 0x48, 0x68 => 0x49, 0x69 => 0x4a, 0x6a => 0x4b, 0x6b => 0x4c, 0x6c => 0x4d, 0x6d => 0x4e, 0x6e => 0x4f, 0x6f => 0x50, 0x70 => 0x51, 0x71 => 0x52, 0x72 => 0x53, 0x73 => 0x54, 0x74 => 0x55, 0x75 => 0x56, 0x76 => 0x57, 0x77 => 0x58, 0x78 => 0x59, 0x79 => 0x5a, 0x7a => 0x5b, 0x7b => 0x5c, 0x7c => 0x5d, 0x7d => 0x5e, 0x7e => 0x5f, 0xa1 => 0x60, 0xa2 => 0x61, 0xa3 => 0x62, 0x2044 => 0x63, 0xa5 => 0x64, 0x192 => 0x65, 0xa7 => 0x66, 0xa4 => 0x67, 0x27 => 0x68, 0x201c => 0x69, 0xab => 0x6a, 0x2039 => 0x6b, 0x203a => 0x6c, 0xfb01 => 0x6d, 0xfb02 => 0x6e, 0x2013 => 0x6f, 0x2020 => 0x70, 0x2021 => 0x71, 0xb7 => 0x72, 0xb6 => 0x73, 0x2022 => 0x74, 0x201a => 0x75, 0x201e => 0x76, 0x201d => 0x77, 0xbb => 0x78, 0x2026 => 0x79, 0x2030 => 0x7a, 0xbf => 0x7b, 0x60 => 0x7c, 0xb4 => 0x7d, 0x2c6 => 0x7e, 0x2dc => 0x7f, 0xaf => 0x80, 0x2d8 => 0x81, 0x2d9 => 0x82, 0xa8 => 0x83, 0x2da => 0x84, 0xb8 => 0x85, 0x2dd => 0x86, 0x2db => 0x87, 0x2c7 => 0x88, 0x2014 => 0x89, 0xc6 => 0x8a, 0xaa => 0x8b, 0x141 => 0x8c, 0xd8 => 0x8d, 0x152 => 0x8e, 0xba => 0x8f, 0xe6 => 0x90, 0x131 => 0x91, 0x142 => 0x92, 0xf8 => 0x93, 0x153 => 0x94, 0xdf => 0x95, 0xcf => 0x96, 0xe9 => 0x97, 0x103 => 0x98, 0x171 => 0x99, 0x11b => 0x9a, 0x178 => 0x9b, 0xf7 => 0x9c, 0xdd => 0x9d, 0xc2 => 0x9e, 0xe1 => 0x9f, 0xdb => 0xa0, 0xfd => 0xa1, 0x219 => 0xa2, 0xea => 0xa3, 0x16e => 0xa4, 0xdc => 0xa5, 0x105 => 0xa6, 0xda => 0xa7, 0x173 => 0xa8, 0xcb => 0xa9, 0x110 => 0xaa, 0xf6c3 => 0xab, 0xa9 => 0xac, 0x112 => 0xad, 0x10d => 0xae, 0xe5 => 0xaf, 0x145 => 0xb0, 0x13a => 0xb1, 0xe0 => 0xb2, 0x162 => 0xb3, 0x106 => 0xb4, 0xe3 => 0xb5, 0x116 => 0xb6, 0x161 => 0xb7, 0x15f => 0xb8, 0xed => 0xb9, 0x25ca => 0xba, 0x158 => 0xbb, 0x122 => 0xbc, 0xfb => 0xbd, 0xe2 => 0xbe, 0x100 => 0xbf, 0x159 => 0xc0, 0xe7 => 0xc1, 0x17b => 0xc2, 0xde => 0xc3, 0x14c => 0xc4, 0x154 => 0xc5, 0x15a => 0xc6, 0x10f => 0xc7, 0x16a => 0xc8, 0x16f => 0xc9, 0xb3 => 0xca, 0xd2 => 0xcb, 0xc0 => 0xcc, 0x102 => 0xcd, 0xd7 => 0xce, 0xfa => 0xcf, 0x164 => 0xd0, 0x2202 => 0xd1, 0xff => 0xd2, 0x143 => 0xd3, 0xee => 0xd4, 0xca => 0xd5, 0xe4 => 0xd6, 0xeb => 0xd7, 0x107 => 0xd8, 0x144 => 0xd9, 0x16b => 0xda, 0x147 => 0xdb, 0xcd => 0xdc, 0xb1 => 0xdd, 0xa6 => 0xde, 0xae => 0xdf, 0x11e => 0xe0, 0x130 => 0xe1, 0x2211 => 0xe2, 0xc8 => 0xe3, 0x155 => 0xe4, 0x14d => 0xe5, 0x179 => 0xe6, 0x17d => 0xe7, 0x2265 => 0xe8, 0xd0 => 0xe9, 0xc7 => 0xea, 0x13c => 0xeb, 0x165 => 0xec, 0x119 => 0xed, 0x172 => 0xee, 0xc1 => 0xef, 0xc4 => 0xf0, 0xe8 => 0xf1, 0x17a => 0xf2, 0x12f => 0xf3, 0xd3 => 0xf4, 0xf3 => 0xf5, 0x101 => 0xf6, 0x15b => 0xf7, 0xef => 0xf8, 0xd4 => 0xf9, 0xd9 => 0xfa, 0x2206 => 0xfb, 0xfe => 0xfc, 0xb2 => 0xfd, 0xd6 => 0xfe, 0xb5 => 0xff, 0xec => 0x100, 0x151 => 0x101, 0x118 => 0x102, 0x111 => 0x103, 0xbe => 0x104, 0x15e => 0x105, 0x13e => 0x106, 0x136 => 0x107, 0x139 => 0x108, 0x2122 => 0x109, 0x117 => 0x10a, 0xcc => 0x10b, 0x12a => 0x10c, 0x13d => 0x10d, 0xbd => 0x10e, 0x2264 => 0x10f, 0xf4 => 0x110, 0xf1 => 0x111, 0x170 => 0x112, 0xc9 => 0x113, 0x113 => 0x114, 0x11f => 0x115, 0xbc => 0x116, 0x160 => 0x117, 0x218 => 0x118, 0x150 => 0x119, 0xb0 => 0x11a, 0xf2 => 0x11b, 0x10c => 0x11c, 0xf9 => 0x11d, 0x221a => 0x11e, 0x10e => 0x11f, 0x157 => 0x120, 0xd1 => 0x121, 0xf5 => 0x122, 0x156 => 0x123, 0x13b => 0x124, 0xc3 => 0x125, 0x104 => 0x126, 0xc5 => 0x127, 0xd5 => 0x128, 0x17c => 0x129, 0x11a => 0x12a, 0x12e => 0x12b, 0x137 => 0x12c, 0x2212 => 0x12d, 0xce => 0x12e, 0x148 => 0x12f, 0x163 => 0x130, 0xac => 0x131, 0xf6 => 0x132, 0xfc => 0x133, 0x2260 => 0x134, 0x123 => 0x135, 0xf0 => 0x136, 0x17e => 0x137, 0x146 => 0x138, 0xb9 => 0x139, 0x12b => 0x13a, 0x20ac => 0x13b);
     $this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name('Courier-Oblique');
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:26,代码来源:Pdf_Pack.php

示例7: getCoveredPercentage

 /**
  * Returns a number between 0 and 1 inclusive that indicates the percentage
  * of characters in the string which are covered by glyphs in this font.
  *
  * Since no one font will contain glyphs for the entire Unicode character
  * range, this method can be used to help locate a suitable font when the
  * actual contents of the string are not known.
  *
  * Note that some fonts lie about the characters they support. Additionally,
  * fonts don't usually contain glyphs for control characters such as tabs
  * and line breaks, so it is rare that you will get back a full 1.0 score.
  * The resulting value should be considered informational only.
  *
  * @param string $string
  * @param string $charEncoding (optional) Character encoding of source text.
  *   If omitted, uses 'current locale'.
  * @return float
  */
 public function getCoveredPercentage($string, $charEncoding = '')
 {
     /* Convert the string to UTF-16BE encoding so we can match the string's
      * character codes to those found in the cmap.
      */
     if ($charEncoding != 'UTF-16BE') {
         $string = iconv($charEncoding, 'UTF-16BE', $string);
     }
     $charCount = iconv_strlen($string, 'UTF-16BE');
     if ($charCount == 0) {
         return 0;
     }
     /* Fetch the covered character code list from the font's cmap.
      */
     $coveredCharacters = $this->cmap->getCoveredCharacters();
     /* Calculate the score by doing a lookup for each character.
      */
     $score = 0;
     $maxIndex = strlen($string);
     for ($i = 0; $i < $maxIndex; $i++) {
         /**
          * @todo Properly handle characters encoded as surrogate pairs.
          */
         $charCode = ord($string[$i]) << 8 | ord($string[++$i]);
         /* This could probably be optimized a bit with a binary search...
          */
         if (in_array($charCode, $coveredCharacters)) {
             $score++;
         }
     }
     return $score / $charCount;
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:50,代码来源:Font.php

示例8: __construct

 /**
  * Object constructor
  *
  * @param Zend_Pdf_FileParser_Font_OpenType $fontParser Font parser object
  *   containing OpenType file.
  * @param integer $embeddingOptions Options for font embedding.
  * @throws Zend_Pdf_Exception
  */
 public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)
 {
     parent::__construct();
     $fontParser->parse();
     /* Object properties */
     $this->_fontNames = $fontParser->names;
     $this->_isBold = $fontParser->isBold;
     $this->_isItalic = $fontParser->isItalic;
     $this->_isMonospaced = $fontParser->isMonospaced;
     $this->_underlinePosition = $fontParser->underlinePosition;
     $this->_underlineThickness = $fontParser->underlineThickness;
     $this->_strikePosition = $fontParser->strikePosition;
     $this->_strikeThickness = $fontParser->strikeThickness;
     $this->_unitsPerEm = $fontParser->unitsPerEm;
     $this->_ascent = $fontParser->ascent;
     $this->_descent = $fontParser->descent;
     $this->_lineGap = $fontParser->lineGap;
     $this->_cmap = $fontParser->cmap;
     /* Resource dictionary */
     $baseFont = $this->getFontName(Zend_Pdf_Font::NAME_POSTSCRIPT, 'en', 'UTF-8');
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name($baseFont);
     /**
      * Prepare widths array.
      */
     /* Constract characters widths array using font CMap and glyphs widths array */
     $glyphWidths = $fontParser->glyphWidths;
     $charGlyphs = $this->_cmap->getCoveredCharactersGlyphs();
     $charWidths = array();
     foreach ($charGlyphs as $charCode => $glyph) {
         if (isset($glyphWidths[$glyph]) && !is_null($glyphWidths[$glyph])) {
             $charWidths[$charCode] = $glyphWidths[$glyph];
         }
     }
     $this->_charWidths = $charWidths;
     $this->_missingCharWidth = $glyphWidths[0];
     /* Width array optimization. Step1: extract default value */
     $widthFrequencies = array_count_values($charWidths);
     $defaultWidth = null;
     $defaultWidthFrequency = -1;
     foreach ($widthFrequencies as $width => $frequency) {
         if ($frequency > $defaultWidthFrequency) {
             $defaultWidth = $width;
             $defaultWidthFrequency = $frequency;
         }
     }
     // Store default value in the font dictionary
     $this->_resource->DW = new Zend_Pdf_Element_Numeric($this->toEmSpace($defaultWidth));
     // Remove characters which corresponds to default width from the widths array
     $defWidthChars = array_keys($charWidths, $defaultWidth);
     foreach ($defWidthChars as $charCode) {
         unset($charWidths[$charCode]);
     }
     // Order cheracter widths aray by character codes
     ksort($charWidths, SORT_NUMERIC);
     /* Width array optimization. Step2: Compact character codes sequences */
     $lastCharCode = -1;
     $widthsSequences = array();
     foreach ($charWidths as $charCode => $width) {
         if ($lastCharCode == -1) {
             $charCodesSequense = array();
             $sequenceStartCode = $charCode;
         } else {
             if ($charCode != $lastCharCode + 1) {
                 // New chracters sequence detected
                 $widthsSequences[$sequenceStartCode] = $charCodesSequense;
                 $charCodesSequense = array();
                 $sequenceStartCode = $charCode;
             }
         }
         $charCodesSequense[] = $width;
         $lastCharCode = $charCode;
     }
     // Save last sequence, if widths array is not empty (it may happens for monospaced fonts)
     if (count($charWidths) != 0) {
         $widthsSequences[$sequenceStartCode] = $charCodesSequense;
     }
     $pdfCharsWidths = array();
     foreach ($widthsSequences as $startCode => $widthsSequence) {
         /* Width array optimization. Step3: Compact widths sequences */
         $pdfWidths = array();
         $lastWidth = -1;
         $widthsInSequence = 0;
         foreach ($widthsSequence as $width) {
             if ($lastWidth != $width) {
                 // New width is detected
                 if ($widthsInSequence != 0) {
                     // Previous width value was a part of the widths sequence. Save it as 'c_1st c_last w'.
                     $pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode);
                     // First character code
                     $pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode + $widthsInSequence - 1);
                     // Last character code
                     $pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($lastWidth));
//.........这里部分代码省略.........
开发者ID:tenstone,项目名称:wecenter,代码行数:101,代码来源:CidFont.php


注:本文中的Zend_Pdf_Cmap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。