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.

62 lines
1.9 KiB

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