Pdf/Cmap/ByteEncoding/Static.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Subpackage
Fonts  
Version
$Id: Static.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Pdf_Cmap_ByteEncoding_Static

Package: Zend\Pdf\Fonts

Custom cmap type used for the Adobe Standard 14 PDF fonts.

Just like Zend_Pdf_Cmap_ByteEncoding except that the constructor takes a predefined array of glyph numbers and can cover any Unicode character.

Parent(s)
\Zend_Pdf_Cmap_ByteEncoding < \Zend_Pdf_Cmap
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  TYPE_BYTE_ENCODING = 0
inherited

Byte Encoding character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_BYTE_ENCODING\Zend_Pdf_Cmap_ByteEncoding::TYPE_BYTE_ENCODING
Constant  TYPE_HIGH_BYTE_MAPPING = 2
inherited

High Byte Mapping character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_HIGH_BYTE_MAPPING\Zend_Pdf_Cmap_ByteEncoding::TYPE_HIGH_BYTE_MAPPING
Constant  TYPE_SEGMENT_TO_DELTA = 4
inherited

Segment Value to Delta Mapping character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_SEGMENT_TO_DELTA\Zend_Pdf_Cmap_ByteEncoding::TYPE_SEGMENT_TO_DELTA
Constant  TYPE_TRIMMED_TABLE = 6
inherited

Trimmed Table character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_TRIMMED_TABLE\Zend_Pdf_Cmap_ByteEncoding::TYPE_TRIMMED_TABLE
Constant  TYPE_MIXED_COVERAGE = 8
inherited

Mixed Coverage character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_MIXED_COVERAGE\Zend_Pdf_Cmap_ByteEncoding::TYPE_MIXED_COVERAGE
Constant  TYPE_TRIMMED_ARRAY = 10
inherited

Trimmed Array character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_TRIMMED_ARRAY\Zend_Pdf_Cmap_ByteEncoding::TYPE_TRIMMED_ARRAY
Constant  TYPE_SEGMENTED_COVERAGE = 12
inherited

Segmented Coverage character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_SEGMENTED_COVERAGE\Zend_Pdf_Cmap_ByteEncoding::TYPE_SEGMENTED_COVERAGE
Constant  TYPE_BYTE_ENCODING_STATIC = 241
inherited

Static Byte Encoding character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC\Zend_Pdf_Cmap_ByteEncoding::TYPE_BYTE_ENCODING_STATIC
Constant  TYPE_UNKNOWN = 255
inherited

Unknown character map table type.

Inherited from: \Zend_Pdf_Cmap::TYPE_UNKNOWN\Zend_Pdf_Cmap_ByteEncoding::TYPE_UNKNOWN
Constant  MISSING_CHARACTER_GLYPH = 0
inherited

Glyph representing missing characters.

Inherited from: \Zend_Pdf_Cmap::MISSING_CHARACTER_GLYPH\Zend_Pdf_Cmap_ByteEncoding::MISSING_CHARACTER_GLYPH

Properties

Propertyprotectedarray $_glyphIndexArray = array()
inherited

Glyph index array.

Inherited from: \Zend_Pdf_Cmap_ByteEncoding::$$_glyphIndexArray

Stores the actual glyph numbers. The array keys are the translated Unicode code points.

Default valuearray()Details
Type
array
Inherited_from
\Zend_Pdf_Cmap_ByteEncoding::$$_glyphIndexArray  

Methods

methodpublic__construct(array $cmapData) : void

Object constructor

Parses the raw binary table data. Throws an exception if the table is malformed.

Parameters
Name Type Description
$cmapData array

Array whose keys are Unicode character codes and values are glyph numbers.

Throws
Exception Description
\Zend_Pdf_Exception
methodprotected_extractInt2(string $data, integer $index) : integer
inherited

Extracts a signed 2-byte integer from a string.

Inherited from: \Zend_Pdf_Cmap::_extractInt2()\Zend_Pdf_Cmap_ByteEncoding::_extractInt2()

Integers are always big-endian. Throws an exception if the index is out of range.

Parameters
Name Type Description
$data string

&$data

$index integer

Position in string of integer.

Returns
Type Description
integer
Throws
Exception Description
\Zend_Pdf_Exception
methodprotected_extractUInt2(string $data, integer $index) : integer
inherited

Extracts an unsigned 2-byte integer from a string.

Inherited from: \Zend_Pdf_Cmap::_extractUInt2()\Zend_Pdf_Cmap_ByteEncoding::_extractUInt2()

Integers are always big-endian. Throws an exception if the index is out of range.

Parameters
Name Type Description
$data string

&$data

$index integer

Position in string of integer.

Returns
Type Description
integer
Throws
Exception Description
\Zend_Pdf_Exception
methodprotected_extractUInt4(string $data, integer $index) : integer
inherited

Extracts an unsigned 4-byte integer from a string.

Inherited from: \Zend_Pdf_Cmap::_extractUInt4()\Zend_Pdf_Cmap_ByteEncoding::_extractUInt4()

Integers are always big-endian. Throws an exception if the index is out of range.

NOTE: If you ask for a 4-byte unsigned integer on a 32-bit machine, the resulting value WILL BE SIGNED because PHP uses signed integers internally for everything. To guarantee portability, be sure to use bitwise or similar operators on large integers!

Parameters
Name Type Description
$data string

&$data

$index integer

Position in string of integer.

Returns
Type Description
integer
Throws
Exception Description
\Zend_Pdf_Exception
methodpubliccmapWithTypeData(integer $cmapType, mixed $cmapData) : \Zend_Pdf_Cmap
staticinherited

Instantiates the appropriate concrete subclass based on the type of cmap table and returns the instance.

Inherited from: \Zend_Pdf_Cmap::cmapWithTypeData()\Zend_Pdf_Cmap_ByteEncoding::cmapWithTypeData()
Parameters
Name Type Description
$cmapType integer

Type of cmap.

$cmapData mixed

Cmap table data. Usually a string or array.

Returns
Type Description
\Zend_Pdf_Cmap
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicgetCoveredCharacters() : array
inherited

Returns an array containing the Unicode characters that have entries in this character map.

Inherited from: \Zend_Pdf_Cmap_ByteEncoding::getCoveredCharacters()
Returns
Type Description
array Unicode character codes.
methodpublicglyphNumberForCharacter(integer $characterCode) : integer
inherited

Returns the glyph number corresponding to the Unicode character.

Inherited from: \Zend_Pdf_Cmap_ByteEncoding::glyphNumberForCharacter()

If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.

See also glyphNumbersForCharacters() which is optimized for bulk operations.

Parameters
Name Type Description
$characterCode integer

Unicode character code (code point).

Returns
Type Description
integer Glyph number.
methodpublicglyphNumbersForCharacters(array $characterCodes) : array
inherited

Returns an array of glyph numbers corresponding to the Unicode characters.

Inherited from: \Zend_Pdf_Cmap_ByteEncoding::glyphNumbersForCharacters()

If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.

See also glyphNumberForCharacter().

Parameters
Name Type Description
$characterCodes array

Array of Unicode character codes (code points).

Returns
Type Description
array Array of glyph numbers.
Documentation was generated by phpDocumentor 2.0.0a8.