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.
package | Zend_Pdf |
---|---|
subpackage | Fonts |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Pdf_Cmap_ByteEncoding |
__construct(array $cmapData)
Parses the raw binary table data. Throws an exception if the table is malformed.
inherited_from | \Zend_Pdf_Cmap_ByteEncoding::__construct() |
---|
array
Array whose keys are Unicode character codes and values are glyph numbers.
\Zend_Pdf_Exception |
---|
__construct(string $cmapData)
Parses the raw binary table data. Throws an exception if the table is malformed.
string
Raw binary cmap table data.
\Zend_Pdf_Exception |
---|
cmapWithTypeData(integer $cmapType, mixed $cmapData) : \Zend_Pdf_Cmap
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
Type of cmap.
mixed
Cmap table data. Usually a string or array.
\Zend_Pdf_Exception |
---|
\Zend_Pdf_Cmap
getCoveredCharacters() : array
array
Unicode character codes.glyphNumberForCharacter(integer $characterCode) : integer
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
Unicode character code (code point).
integer
Glyph number.glyphNumbersForCharacters(array $characterCodes) : array
If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.
See also \glyphNumberForCharacter().
array
Array of Unicode character codes (code points).
array
Array of glyph numbers._extractInt2($data, integer $index) : integer
Integers are always big-endian. Throws an exception if the index is out of range.
integer
Position in string of integer.
\Zend_Pdf_Exception |
---|
integer
_extractUInt2($data, integer $index) : integer
Integers are always big-endian. Throws an exception if the index is out of range.
integer
Position in string of integer.
\Zend_Pdf_Exception |
---|
integer
_extractUInt4($data, integer $index) : integer
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!
integer
Position in string of integer.
\Zend_Pdf_Exception |
---|
integer
$_glyphIndexArray : array
array()
MISSING_CHARACTER_GLYPH = 0
TYPE_BYTE_ENCODING = 0
TYPE_BYTE_ENCODING_STATIC = 241
TYPE_HIGH_BYTE_MAPPING = 2
TYPE_MIXED_COVERAGE = 8
TYPE_SEGMENTED_COVERAGE = 12
TYPE_SEGMENT_TO_DELTA = 4
TYPE_TRIMMED_ARRAY = 10
TYPE_TRIMMED_TABLE = 6
TYPE_UNKNOWN = 255