Table of contents
Namespace: Com\Tecnick\Pdf\Font\Import
Implements: ProcessorInterface
File: TrueType.php line 45
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-import-type: TFontData from \Com\Tecnick\Pdf\Font\Load
- SuppressWarnings: (“PHPMD.ExcessiveClassComplexity”)
- SuppressWarnings: (“PHPMD.ExcessiveClassLength”)
Methods
__construct()
File: TrueType.php line 181
public __construct(string $font, TFontData $fdt, File $fileHelper, Byte $fbyte[, array<int, bool> $subchars = [] ][, bool $withCbbox = true ][, bool $subsetting = false ]) : mixed
Parameters
- $font : string: Content of the input font file
- $fdt : TFontData: Extracted font metrics
- $fileHelper : File: File helper for font loading.
- $fbyte : Byte: Object used to read font bytes
- $subchars : array<int, bool> = []: Array containing subset chars
- $withCbbox : bool = true: If true, compute the per-glyph bounding boxes.
- $subsetting : bool = false: If true, the font program is being subset rather than imported, so the original file is neither copied nor linked again.
Tags
- throws: Exception
- throws: Exception
getFontMetrics()
File: TrueType.php line 200
public getFontMetrics() : TFontData
Return values
TFontData
getSubGlyphs()
File: TrueType.php line 210
public getSubGlyphs() : array<int, bool>
Return values
array<int, bool>
isSubsettingAllowed()
File: TrueType.php line 221
public isSubsettingAllowed() : bool
This reports what the program declares, unlike the ‘subset’ metric, which carries what the document asked for.
Return values
bool