OpenTypeData
in package
Parsed OpenType CFF font data — metrics, glyph widths, and raw CFF bytes.
Mirrors TrueTypeData but adds the CFF table bytes and stores the full raw font file for potential whole-file embedding.
Table of Contents
Properties
- $ascent : int
- $capHeight : int
- $cffBytes : string
- $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>
- $italicAngle : float
- $kernPairs : array<string|int, mixed>|null
- $ligatures : array<string|int, mixed>|null
- $postScriptName : string
- $stemV : int
- $underlinePosition : int|null
- $underlineThickness : int|null
- $unicodeMap : array<string|int, mixed>
- $unitsPerEm : int
- $verticalWidths : array<string|int, mixed>|null
- $xHeight : int
Methods
- __construct() : mixed
Properties
$ascent
public
int
$ascent
$capHeight
public
int
$capHeight
$cffBytes
public
string
$cffBytes
$charWidths
public
array<string|int, mixed>
$charWidths
$descent
public
int
$descent
$embeddingAllowed
public
bool
$embeddingAllowed
$familyName
public
string
$familyName
$flags
public
int
$flags
$fontBBox
public
array<string|int, mixed>
$fontBBox
$fontBytes
public
string
$fontBytes
$fullUnicodeToGid
public
array<string|int, mixed>
$fullUnicodeToGid
= []
$glyphWidths
public
array<string|int, mixed>
$glyphWidths
= []
$italicAngle
public
float
$italicAngle
$kernPairs
public
array<string|int, mixed>|null
$kernPairs
= null
$ligatures
public
array<string|int, mixed>|null
$ligatures
= null
$postScriptName
public
string
$postScriptName
$stemV
public
int
$stemV
$underlinePosition
public
int|null
$underlinePosition
= null
$underlineThickness
public
int|null
$underlineThickness
= null
$unicodeMap
public
array<string|int, mixed>
$unicodeMap
$unitsPerEm
public
int
$unitsPerEm
= 1000
$verticalWidths
public
array<string|int, mixed>|null
$verticalWidths
= null
$xHeight
public
int
$xHeight
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 $cffBytes, 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 ][, array<int, int>|null $verticalWidths = null ][, int|null $underlinePosition = null ][, int|null $underlineThickness = null ]) : mixed
Parameters
- $postScriptName : string
-
PostScript name (name table ID 6)
- $familyName : string
-
Family name (name table ID 1)
- $ascent : int
-
Typographic ascender (1000 units/em)
- $descent : int
-
Typographic descender (negative, 1000 units/em)
- $capHeight : int
-
Cap height (1000 units/em)
- $xHeight : int
-
x-height (1000 units/em)
- $italicAngle : float
-
Italic angle in degrees
- $stemV : int
-
Estimated vertical stem width
- $flags : int
-
PDF font flags bitmask
- $fontBBox : array<int, int>
-
[xMin, yMin, xMax, yMax] (1000 units/em)
- $charWidths : array<int, int>
-
WinAnsi byte (32-255) → width (1000 units/em)
- $unicodeMap : array<int, int>
-
WinAnsi byte (32-255) → Unicode codepoint
- $cffBytes : string
-
Raw CFF table bytes (for /FontFile3 /Subtype /CIDFontType0C)
- $fontBytes : string
-
Raw OTF file bytes (for /FontFile3 /Subtype /OpenType)
- $embeddingAllowed : bool
-
fsType restriction check
- $unitsPerEm : int = 1000
-
Font design units per em
- $fullUnicodeToGid : array<int, int> = []
-
All Unicode → GID mappings
- $glyphWidths : array<int, int> = []
-
GID → advance width (design units)
- $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
- $verticalWidths : array<int, int>|null = null
-
GID => vertical advance width (design units)
- $underlinePosition : int|null = null
-
posttable FWord — offset of the underline's top edge from the baseline (design units; negative = below baseline). Null if the table is missing. - $underlineThickness : int|null = null
-
posttable FWord — underline stroke thickness in design units.