Static.php 1.8 KB

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