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 license@zend.com so we can send you a copy immediately.
Implements the "segment mapping to delta values" character map (type 4).
This is the Microsoft standard mapping table type for OpenType fonts. It provides the ability to cover multiple contiguous ranges of the Unicode character set, with the exception of Unicode Surrogates (U+D800 - U+DFFF).

array
$_glyphIndexArray= 'array'
Glyph index array. Stores glyph numbers, used with range offset.
array
Details
integer
$_searchIterations= '0'
The number of binary search steps required to cover the entire search range.
0
Details
integer
$_searchRange= '0'
The size of the binary search range for segments.
0
Details
integer
$_searchRangeEndCode= '0'
The ending character code for the segment at the end of the low search range.
0
Details
array
$_segmentTableEndCodes= 'array'
Array of ending character codes for each segment.
array
Details
array
$_segmentTableIdDeltas= 'array'
Array of character code to glyph delta values for each segment.
array
Details
array
$_segmentTableIdRangeOffsets= 'array'
Array of offsets into the glyph index array for each segment.
array
Details
__construct(
string $cmapData
)
:
void
Object constructor
Parses the raw binary table data. Throws an exception if the table is malformed.
Name | Type | Description |
---|---|---|
$cmapData | string | Raw binary cmap table data. |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

_extractInt2(
string $data, integer $index
)
:
integer
Extracts a signed 2-byte integer from a string.
Inherited from: \Zend_Pdf_Cmap::_extractInt2()Integers are always big-endian. Throws an exception if the index is out of range.
Name | Type | Description |
---|---|---|
$data | string | &$data |
$index | integer | Position in string of integer. |
Type | Description |
---|---|
integer |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

_extractUInt2(
string $data, integer $index
)
:
integer
Extracts an unsigned 2-byte integer from a string.
Inherited from: \Zend_Pdf_Cmap::_extractUInt2()Integers are always big-endian. Throws an exception if the index is out of range.
Name | Type | Description |
---|---|---|
$data | string | &$data |
$index | integer | Position in string of integer. |
Type | Description |
---|---|
integer |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

_extractUInt4(
string $data, integer $index
)
:
integer
Extracts an unsigned 4-byte integer from a string.
Inherited from: \Zend_Pdf_Cmap::_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!
Name | Type | Description |
---|---|---|
$data | string | &$data |
$index | integer | Position in string of integer. |
Type | Description |
---|---|
integer |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

cmapWithTypeData(
integer $cmapType, mixed $cmapData
)
:
\Zend_Pdf_Cmap
Instantiates the appropriate concrete subclass based on the type of cmap table and returns the instance.
Inherited from: \Zend_Pdf_Cmap::cmapWithTypeData()The cmap type must be one of the following values:
Throws an exception if the table type is invalid or the cmap table data cannot be validated.
Name | Type | Description |
---|---|---|
$cmapType | integer | Type of cmap. |
$cmapData | mixed | Cmap table data. Usually a string or array. |
Type | Description |
---|---|
\Zend_Pdf_Cmap |
Exception | Description |
---|---|
\Zend_Pdf_Exception |

getCoveredCharacters(
)
:
array
Returns an array containing the Unicode characters that have entries in this character map.
Type | Description |
---|---|
array | Unicode character codes. |

glyphNumberForCharacter(
integer $characterCode
)
:
integer
Returns the glyph number corresponding to the Unicode character.
If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.
See also {@link glyphNumbersForCharacters()} which is optimized for bulk operations.
Name | Type | Description |
---|---|---|
$characterCode | integer | Unicode character code (code point). |
Type | Description |
---|---|
integer | Glyph number. |

glyphNumbersForCharacters(
array $characterCodes
)
:
array
Returns an array of glyph numbers corresponding to the Unicode characters.
If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.
See also {@link glyphNumberForCharacter()}.
Name | Type | Description |
---|---|---|
$characterCodes | array | Array of Unicode character codes (code points). |
Type | Description |
---|---|
array | Array of glyph numbers. |