Table of contents
Namespace: Com\Tecnick\Pdf\Font
abstract class Load
Source: src/Load.php:176
Types
TFontDataCidInfo
array{
'Ordering': string,
'Registry': string,
'Supplement': int,
'uni2cid': array<int, int>,
}
TFontDataDesc
array{
'Ascent': int,
'AvgWidth': int,
'CapHeight': int,
'Descent': int,
'Flags': int,
'FontBBox': string,
'ItalicAngle': int,
'Leading': int,
'MaxWidth': int,
'MissingWidth': int,
'StemH': int,
'StemV': int,
'XHeight': int,
}
TFontDataEncTable
array{
'encodingID': int,
'offset': int,
'platformID': int,
}
TFontDataMode
array{
'bold': bool,
'italic': bool,
'linethrough': bool,
'overline': bool,
'underline': bool,
}
TFontDataTableItem
array{
'checkSum': int,
'data': string,
'length': int,
'offset': int,
}
TFontData
array{
'Ascender': int,
'Ascent': int,
'AvgWidth': float,
'CapHeight': int,
'CharacterSet': string,
'Descender': int,
'Descent': int,
'EncodingScheme': string,
'FamilyName': string,
'Flags': int,
'FontBBox': array<int>,
'FontName': string,
'FullName': string,
'IsFixedPitch': bool,
'ItalicAngle': int,
'Leading': int,
'MaxWidth': int,
'MissingWidth': int|null,
'StdHW': int,
'StdVW': int,
'StemH': int,
'StemV': int,
'UnderlinePosition': int,
'UnderlineThickness': int,
'Version': string,
'Weight': string,
'XHeight': int,
'bbox': string,
'cbbox': array<int, array<int, int>>,
'cbboxu': array<int, array<int, int>>,
'cidinfo': TFontDataCidInfo,
'compress': bool,
'ctg': string,
'ctgdata': array<int, int>,
'ctgu': array<int, int>,
'cw': array<int, int>,
'cwu': array<int, int>,
'datafile': string,
'desc': TFontDataDesc,
'diff': string,
'diff_n': int,
'diffid'?: int,
'dir': string,
'dw': int,
'enc': string,
'enc_map': array<int, string>,
'encodingTables': array<int, TFontDataEncTable>,
'encoding_id': int,
'encrypted': string,
'fakestyle': bool,
'family': string,
'file': string,
'file_n': int,
'file_name': string,
'gidenc': bool,
'i': int,
'ifile': string,
'indexToLoc': array<int, int>,
'input_file': string,
'isUnicode': bool,
'italicAngle': float,
'key': string,
'lenIV': int,
'length1': int,
'length2': int,
'linked': bool,
'mode': TFontDataMode,
'n': int,
'name': string,
'numGlyphs': int,
'numHMetrics': int,
'originalsize': int,
'pdfa': bool,
'platform_id': int,
'settype': string,
'short_offset': bool,
'size1': int,
'size2': int,
'style': string,
'subset': bool,
'subsetchars': array<int, bool>,
'table': array<string, TFontDataTableItem>,
'tot_num_glyphs': int,
'type': string,
'underlinePosition': int,
'underlineThickness': int,
'unicode': bool,
'unitsPerEm': int,
'up': int,
'urk': float,
'usedgid': array<int, int>,
'ut': int,
'weight': string,
}
Constants
DEFAULT_DATA
Default value of every font data entry.
Shared with Import and Subset, which start from the same state.
public const DEFAULT_DATA = ['Ascender' => 0, 'Ascent' => 0, 'AvgWidth' => 0.0, 'CapHeight' => 0, 'CharacterSet' => '', 'Descender' => 0, 'Descent' => 0, 'EncodingScheme' => '', 'FamilyName' => '', 'Flags' => 0, 'FontBBox' => [], 'FontName' => '', 'FullName' => '', 'IsFixedPitch' => false, 'ItalicAngle' => 0, 'Leading' => 0, 'MaxWidth' => 0, 'MissingWidth' => 0, 'StdHW' => 0, 'StdVW' => 0, 'StemH' => 0, 'StemV' => 0, 'Underl
// … truncated, see source
Source: src/Load.php:208
Methods
__construct()
public __construct(File|null $fileHelper = null)
Parameters:
$fileHelper(File|null): Optional file helper for font loading.
Source: src/Load.php:338
load()
Load the font data
public load(): void
Throws:
- Exception: in case of error
Source: src/Load.php:349
setFileData()
Set the embedded font file lengths
public setFileData(): void
Source: src/Load.php:563