Load

Com\Tecnick\Pdf\Font\Load

Namespace: Com\Tecnick\Pdf\Font

Abstract: Yes

File: Load.php line 176

Tags

  • since: 2011-05-23
  • category: Library
  • author: Nicola Asuni info@tecnick.com
  • copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
  • license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
  • link: https://github.com/tecnickcom/tc-lib-pdf-font
  • phpstan-type: TFontDataCidInfo array{ ‘Ordering’: string, ‘Registry’: string, ‘Supplement’: int, ‘uni2cid’: array<int, int>, }
  • phpstan-type: 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, }
  • phpstan-type: TFontDataEncTable array{ ’encodingID’: int, ‘offset’: int, ‘platformID’: int, }
  • phpstan-type: TFontDataMode array{ ‘bold’: bool, ‘italic’: bool, ’linethrough’: bool, ‘overline’: bool, ‘underline’: bool, }
  • phpstan-type: TFontDataTableItem array{ ‘checkSum’: int, ‘data’: string, ’length’: int, ‘offset’: int, }
  • phpstan-type: TFontData array{ ‘Ascender’: int, ‘Ascent’: int, ‘AvgWidth’: float, ‘CapHeight’: int, ‘CharacterSet’: string, ‘Descender’: int, ‘Descent’: int, ‘EncodingScheme’: string, ‘FamilyName’: string, ‘Flags’: int, ‘FontBBox’: array, ‘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

File: Load.php line 208

public TFontData 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, 'UnderlinePosition' => 0, 'UnderlineThickness' => 0, 'Version' => '', 'Weight' => '', 'XHeight' => 0, 'bbox' => '', 'cbbox' => [], 'cbboxu' => [], 'cidinfo' => ['Ordering' => '', 'Registry' => '', 'Supplement' => 0, 'uni2cid' => []], 'compress' => false, 'ctg' => '', 'ctgdata' => [], 'ctgu' => [], 'cw' => [], 'cwu' => [], 'datafile' => '', 'desc' => ['Ascent' => 0, 'AvgWidth' => 0, 'CapHeight' => 0, 'Descent' => 0, 'Flags' => 0, 'FontBBox' => '', 'ItalicAngle' => 0, 'Leading' => 0, 'MaxWidth' => 0, 'MissingWidth' => 0, 'StemH' => 0, 'StemV' => 0, 'XHeight' => 0], 'diff' => '', 'diff_n' => 0, 'dir' => '', 'dw' => 0, 'enc' => '', 'enc_map' => [], 'encodingTables' => [], 'encoding_id' => 0, 'encrypted' => '', 'fakestyle' => false, 'family' => '', 'file' => '', 'file_n' => 0, 'file_name' => '', 'gidenc' => false, 'i' => 0, 'ifile' => '', 'indexToLoc' => [], 'input_file' => '', 'isUnicode' => false, 'italicAngle' => 0, 'key' => '', 'lenIV' => 0, 'length1' => 0, 'length2' => 0, 'linked' => false, 'mode' => ['bold' => false, 'italic' => false, 'linethrough' => false, 'overline' => false, 'underline' => false], 'n' => 0, 'name' => '', 'numGlyphs' => 0, 'numHMetrics' => 0, 'originalsize' => 0, 'pdfa' => false, 'platform_id' => 0, 'settype' => '', 'short_offset' => false, 'size1' => 0, 'size2' => 0, 'style' => '', 'subset' => false, 'subsetchars' => [], 'table' => [], 'tot_num_glyphs' => 0, 'type' => '', 'underlinePosition' => 0, 'underlineThickness' => 0, 'unicode' => false, 'unitsPerEm' => 0, 'up' => 0, 'urk' => 0.0, 'usedgid' => [], 'ut' => 0, 'weight' => '']

Shared with Import and Subset, which start from the same state.

Methods

__construct()

File: Load.php line 338

public __construct([File|null $fileHelper = null ]) : mixed

Parameters

  • $fileHelper : File|null = null: Optional file helper for font loading.

load()

File: Load.php line 349

public load() : void

Tags

setFileData()

File: Load.php line 568

public setFileData() : void