SetaPDF_Core_Font_TrueType_Subset_File_Identity Font subsetting class used for identity encoding (more bytes).
File: /SetaPDF v2/Core/Font/TrueType/Subset/File/Identity.php
Class hierarchy
Summary
Properties
$_cmapOriginSubTable
private SetaPDF_Core_Font_TrueType_Table_CharacterToGlyphIndexMapping_SubTable SetaPDF_Core_Font_TrueType_Subset_File_Identity::$_cmapOriginSubTable
A cmap sub table, in order to get the glyph ids.
$_glyf
private SetaPDF_Core_Font_TrueType_Subset_Table_GlyphData SetaPDF_Core_Font_TrueType_Subset_File_Identity::$_glyf
The glyf table.
$_tables
protected SetaPDF_Core_Font_TrueType_Subset_Table[] SetaPDF_Core_Font_TrueType_Subset_File::$_tables = array()
The table instances.
Static Methods
calculateChecksumAdjustment()
public static SetaPDF_Core_Font_TrueType_Subset_File::calculateChecksumAdjustment (
string $offsetData, string[] $checksums
): stringCalculates the checksum adjustment.
Parameters
- $offsetData : string
- $checksums : string[]
calculateTableChecksum()
public static SetaPDF_Core_Font_TrueType_Subset_File::calculateTableChecksum (
string $data
): stringCalculates a table checksum.
Parameters
- $data : string
Methods
__construct()
The constructor.
Parameters
- $font : SetaPDF_Core_Font_TrueType_File
Exceptions
Throws SetaPDF_Core_Font_Exception
_prepareSubset()
_resolveGlyphs()
protected SetaPDF_Core_Font_TrueType_Subset_File::_resolveGlyphs (
array $glyphs, array &$data [, int $depth = 0 ]
): arrayResolves all the glyphs recursively and updates the data array accordingly.
Parameters
- $glyphs : array
- $data : array
- $depth : int
Exceptions
Throws SetaPDF_Core_Font_Exception
_writeOffsetTable()
Writes the offset table.
Parameters
- $writer : SetaPDF_Core_Writer_WriterInterface
_writeTable()
protected SetaPDF_Core_Font_TrueType_Subset_File::_writeTable (
SetaPDF_Core_Writer_WriterInterface $writer, string $tag
): arrayWrites a single table and returns information about it.
Parameters
- $writer : SetaPDF_Core_Writer_WriterInterface
- $tag : string
addChar()
Adds a character to the subset and returns the value to which it is registered.
Parameters
- $char : string
The char in UTF16-BE encoding
addCharCode()
Adds a char code to the subset.
Parameters
- $charCode : int
The unicode point to add.
Return Values
The new point in the individual encoding.
getTable()
public SetaPDF_Core_Font_TrueType_Subset_File::getTable (
string $tag
): SetaPDF_Core_Font_TrueType_Subset_TableGets a table.
Parameters
- $tag : string
Exceptions
Throws SetaPDF_Core_Font_Exception
subset()
Subsets the font.
Parameters
- $writer : SetaPDF_Core_Writer_WriterInterface
Exceptions
Throws SetaPDF_Core_Font_Exception