phpdftk API Documentation

Type1Data
in package

Read onlyYes

Parsed data from a Type 1 font (PFB/PFA).

Mirrors TrueTypeData but carries Type 1–specific segment lengths needed for the /FontFile stream dictionary (/Length1, /Length2, /Length3).

Table of Contents

Properties

$ascent  : int
$capHeight  : int
$charWidths  : array<string|int, mixed>
$descent  : int
$encoding  : array<string|int, mixed>
$familyName  : string
$flags  : int
$fontBBox  : array<string|int, mixed>
$fontBytes  : string
$glyphWidths  : array<string|int, mixed>
$italicAngle  : float
$length1  : int
$length2  : int
$length3  : int
$postScriptName  : string
$stemV  : int
$unicodeMap  : array<string|int, mixed>
$xHeight  : int

Methods

__construct()  : mixed

Properties

$charWidths

public array<string|int, mixed> $charWidths

$encoding

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

$fontBBox

public array<string|int, mixed> $fontBBox

$glyphWidths

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

$postScriptName

public string $postScriptName

$unicodeMap

public array<string|int, mixed> $unicodeMap

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, int $length1, int $length2, int $length3[, array<string, int> $glyphWidths = [] ][, array<int, string> $encoding = [] ]) : mixed
Parameters
$postScriptName : string

PostScript font name (from /FontName)

$familyName : string

Family name (from /FullName or /FamilyName)

$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 (0 if unavailable)

$italicAngle : float

Italic angle in degrees

$stemV : int

Vertical stem width estimate

$flags : int

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

$fontBBox : array<int, int>

[xMin, yMin, xMax, yMax] (1000 units/em)

$charWidths : array<int, int>

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

$unicodeMap : array<int, int>

byte (0-255) => Unicode codepoint

$fontBytes : string

Raw font file bytes (PFB format for embedding)

$length1 : int

ASCII header segment length

$length2 : int

Encrypted (binary) segment length

$length3 : int

Trailer (zeros) segment length

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

glyphName => advance width (1000 units/em)

$encoding : array<int, string> = []

byte (0-255) => glyph name


        
On this page

Search results