phpdftk API Documentation

TrueTypeData
in package

Read onlyYes

Table of Contents

Properties

$ascent  : int
$capHeight  : int
$charWidths  : array<string|int, mixed>
$descent  : int
$embeddingAllowed  : bool
$familyName  : string
$flags  : int
$fontBBox  : array<string|int, mixed>
$fontBytes  : string
$fullUnicodeToGid  : array<string|int, mixed>
$glyphWidths  : array<string|int, mixed>
$isVariableFont  : bool
$italicAngle  : float
$kernPairs  : array<string|int, mixed>|null
$ligatures  : array<string|int, mixed>|null
$namedInstances  : array<string|int, mixed>|null
$postScriptName  : string
$stemV  : int
$unicodeMap  : array<string|int, mixed>
$unitsPerEm  : int
$variationAxes  : array<string|int, mixed>|null
$xHeight  : int

Methods

__construct()  : mixed

Properties

$fullUnicodeToGid

public array<string|int, mixed> $fullUnicodeToGid = []

$glyphWidths

public array<string|int, mixed> $glyphWidths = []

$kernPairs

public array<string|int, mixed>|null $kernPairs = null

$ligatures

public array<string|int, mixed>|null $ligatures = null

$namedInstances

public array<string|int, mixed>|null $namedInstances = null

$variationAxes

public array<string|int, mixed>|null $variationAxes = null

Methods

__construct()

public __construct(string $postScriptName, string $familyName, int $ascent, int $descent, int $capHeight, int $xHeight, float $italicAngle, int $stemV, int $flags, array<int, int> $fontBBox, array<int, int> $charWidths, array<int, int> $unicodeMap, string $fontBytes, bool $embeddingAllowed[, int $unitsPerEm = 1000 ][, array<int, int> $fullUnicodeToGid = [] ][, array<int, int> $glyphWidths = [] ][, array<int, array<int, int>>|null $kernPairs = null ][, array<int, array<int, array{components: int[], ligature: int}>>|null $ligatures = null ][, bool $isVariableFont = false ][, array<int, array{tag: string, minValue: float, defaultValue: float, maxValue: float, nameId: int}>|null $variationAxes = null ][, array<int, array{subfamilyNameId: int, coordinates: array}>|null $namedInstances = null ]) : mixed
Parameters
$postScriptName : string

PostScript name (name table ID 6)

$familyName : string

Family name (name table ID 1)

$ascent : int

Typographic ascender scaled to 1000 units/em

$descent : int

Typographic descender (negative) scaled to 1000 units/em

$capHeight : int

Cap height scaled to 1000 units/em

$xHeight : int

x-height scaled to 1000 units/em

$italicAngle : float

Italic angle in degrees (from post table)

$stemV : int

Estimated vertical stem width (for PDF FontDescriptor)

$flags : int

PDF font flags bitmask (ISO 32000-2 Table 123)

$fontBBox : array<int, int>

[xMin, yMin, xMax, yMax] scaled to 1000 units/em

$charWidths : array<int, int>

WinAnsi byte (32-255) => advance width (1000 units/em)

$unicodeMap : array<int, int>

WinAnsi byte (32-255) => Unicode codepoint (only bytes with valid glyphs)

$fontBytes : string

Raw TTF file bytes

$embeddingAllowed : bool

false when fsType bits 1-2 indicate restricted licence (value 2)

$unitsPerEm : int = 1000

Font design units per em (from head table)

$fullUnicodeToGid : array<int, int> = []

All Unicode codepoint => GID mappings from cmap

$glyphWidths : array<int, int> = []

GID => advance width in font design units (unscaled)

$kernPairs : array<int, array<int, int>>|null = null

leftGid => [rightGid => xAdvanceAdjust] (design units)

$ligatures : array<int, array<int, array{components: int[], ligature: int}>>|null = null

firstGid => ligature rules

$isVariableFont : bool = false

Whether this is an OpenType variable font (has fvar table)

$variationAxes : array<int, array{tag: string, minValue: float, defaultValue: float, maxValue: float, nameId: int}>|null = null

Variation axis definitions from fvar

$namedInstances : array<int, array{subfamilyNameId: int, coordinates: array}>|null = null

Named instances from fvar


        
On this page

Search results