|
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-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: Static.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
21 */ |
|
22 |
|
23 /** Zend_Pdf_Cmap_ByteEncoding */ |
|
24 require_once 'Zend/Pdf/Cmap/ByteEncoding.php'; |
|
25 |
|
26 |
|
27 /** |
|
28 * Custom cmap type used for the Adobe Standard 14 PDF fonts. |
|
29 * |
|
30 * Just like {@link Zend_Pdf_Cmap_ByteEncoding} except that the constructor |
|
31 * takes a predefined array of glyph numbers and can cover any Unicode character. |
|
32 * |
|
33 * @package Zend_Pdf |
|
34 * @subpackage Fonts |
|
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
37 */ |
|
38 class Zend_Pdf_Cmap_ByteEncoding_Static extends Zend_Pdf_Cmap_ByteEncoding |
|
39 { |
|
40 /**** Public Interface ****/ |
|
41 |
|
42 |
|
43 /* Object Lifecycle */ |
|
44 |
|
45 /** |
|
46 * Object constructor |
|
47 * |
|
48 * @param array $cmapData Array whose keys are Unicode character codes and |
|
49 * values are glyph numbers. |
|
50 * @throws Zend_Pdf_Exception |
|
51 */ |
|
52 public function __construct($cmapData) |
|
53 { |
|
54 if (! is_array($cmapData)) { |
|
55 require_once 'Zend/Pdf/Exception.php'; |
|
56 throw new Zend_Pdf_Exception('Constructor parameter must be an array', |
|
57 Zend_Pdf_Exception::BAD_PARAMETER_TYPE); |
|
58 } |
|
59 $this->_glyphIndexArray = $cmapData; |
|
60 } |
|
61 |
|
62 } |