Zend Framework
1.12
|
Public Member Functions | |
__construct ($cmapData) | |
Object constructor. | |
glyphNumbersForCharacters ($characterCodes) | |
Returns an array of glyph numbers corresponding to the Unicode characters. | |
glyphNumberForCharacter ($characterCode) | |
Returns the glyph number corresponding to the Unicode character. | |
getCoveredCharacters () | |
Returns an array containing the Unicode characters that have entries in this character map. | |
getCoveredCharactersGlyphs () | |
Returns an array containing the glyphs numbers that have entries in this character map. | |
Static Public Member Functions | |
static | cmapWithTypeData ($cmapType, $cmapData) |
Instantiates the appropriate concrete subclass based on the type of cmap table and returns the instance. | |
Public Attributes | |
const | TYPE_BYTE_ENCODING = 0x00 |
Byte Encoding character map table type. | |
const | TYPE_HIGH_BYTE_MAPPING = 0x02 |
High Byte Mapping character map table type. | |
const | TYPE_SEGMENT_TO_DELTA = 0x04 |
Segment Value to Delta Mapping character map table type. | |
const | TYPE_TRIMMED_TABLE = 0x06 |
Trimmed Table character map table type. | |
const | TYPE_MIXED_COVERAGE = 0x08 |
Mixed Coverage character map table type. | |
const | TYPE_TRIMMED_ARRAY = 0x0a |
Trimmed Array character map table type. | |
const | TYPE_SEGMENTED_COVERAGE = 0x0c |
Segmented Coverage character map table type. | |
const | TYPE_BYTE_ENCODING_STATIC = 0xf1 |
Static Byte Encoding character map table type. | |
const | TYPE_UNKNOWN = 0xff |
Unknown character map table type. | |
const | MISSING_CHARACTER_GLYPH = 0x00 |
Glyph representing missing characters. | |
Protected Member Functions | |
_extractInt2 (&$data, $index) | |
Extracts a signed 2-byte integer from a string. | |
_extractUInt2 (&$data, $index) | |
Extracts an unsigned 2-byte integer from a string. | |
_extractUInt4 (&$data, $index) | |
Extracts an unsigned 4-byte integer from a string. | |
|
abstract |
Object constructor.
Parses the raw binary table data. Throws an exception if the table is malformed.
string | $cmapData | Raw binary cmap table data. |
Zend_Pdf_Exception |
|
protected |
Extracts a signed 2-byte integer from a string.
Integers are always big-endian. Throws an exception if the index is out of range.
string | &$data | |
integer | $index | Position in string of integer. |
Zend_Pdf_Exception |
|
protected |
Extracts an unsigned 2-byte integer from a string.
Integers are always big-endian. Throws an exception if the index is out of range.
string | &$data | |
integer | $index | Position in string of integer. |
Zend_Pdf_Exception |
|
protected |
Extracts an unsigned 4-byte integer from a string.
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!
string | &$data | |
integer | $index | Position in string of integer. |
Zend_Pdf_Exception |
|
static |
Instantiates the appropriate concrete subclass based on the type of cmap table and returns the instance.
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.
integer | $cmapType | Type of cmap. |
mixed | $cmapData | Cmap table data. Usually a string or array. |
Zend_Pdf_Exception |
|
abstract |
Returns an array containing the Unicode characters that have entries in this character map.
|
abstract |
Returns an array containing the glyphs numbers that have entries in this character map.
Keys are Unicode character codes (integers)
This functionality is partially covered by glyphNumbersForCharacters(getCoveredCharacters()) call, but this method do it in more effective way (prepare complete list instead of searching glyph for each character code).
|
abstract |
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 glyphNumbersForCharacters() which is optimized for bulk operations.
integer | $characterCode | Unicode character code (code point). |
|
abstract |
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 glyphNumberForCharacter().
array | $characterCodes | Array of Unicode character codes (code points). |
const MISSING_CHARACTER_GLYPH = 0x00 |
Glyph representing missing characters.
const TYPE_BYTE_ENCODING = 0x00 |
Byte Encoding character map table type.
const TYPE_BYTE_ENCODING_STATIC = 0xf1 |
Static Byte Encoding character map table type.
Variant of TYPE_BYTEENCODING.
const TYPE_HIGH_BYTE_MAPPING = 0x02 |
High Byte Mapping character map table type.
const TYPE_MIXED_COVERAGE = 0x08 |
Mixed Coverage character map table type.
const TYPE_SEGMENT_TO_DELTA = 0x04 |
Segment Value to Delta Mapping character map table type.
const TYPE_SEGMENTED_COVERAGE = 0x0c |
Segmented Coverage character map table type.
const TYPE_TRIMMED_ARRAY = 0x0a |
Trimmed Array character map table type.
const TYPE_TRIMMED_TABLE = 0x06 |
Trimmed Table character map table type.
const TYPE_UNKNOWN = 0xff |
Unknown character map table type.