Table of contents
Namespace: Com\Tecnick\Pdf\Font\Import
class TrueType implements ProcessorInterface
Implements: ProcessorInterface
Source: src/Import/TrueType.php:45
Methods
__construct()
Process TrueType font
public __construct(
string $font,
TFontData $fdt,
File $fileHelper,
Byte $fbyte,
array<int,bool> $subchars = [],
bool $withCbbox = true,
bool $subsetting = false
)
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): If true, compute the per-glyph bounding boxes.$subsetting(bool): If true, the font program is being subset rather than imported, so the original file is neither copied nor linked again.
Throws:
Source: src/Import/TrueType.php:181
getFontMetrics()
Get all the extracted font metrics
public getFontMetrics(): TFontData
Returns: TFontData
Source: src/Import/TrueType.php:200
getSubGlyphs()
Get glyphs in the subset
public getSubGlyphs(): array<int,bool>
Returns: array<int,bool>
Source: src/Import/TrueType.php:210
isSubsettingAllowed()
Returns true when the OS/2 licensing bits of this font program allow subsetting.
This reports what the program declares, unlike the ‘subset’ metric, which carries what the document asked for.
public isSubsettingAllowed(): bool
Returns: bool
Source: src/Import/TrueType.php:221