Com\Tecnick\Pdf\Font\Subset
Tags
Table of Contents
- $fbyte : Byte
- Object used to read font bytes
- $fdt : array<string|int, mixed>
- Extracted font metrics
- $font : string
- Content of the input font file
- $subfont : string
- Subset font
- $subglyphs : array<string|int, mixed>
- Array containing subset glyphs indexes of chars from cmap table
- __construct() : mixed
- Process TrueType font
- getSubsetFont() : string
- Get all the extracted font metrics
- addCompositeGlyphs() : mixed
- Add composite glyphs
- addProcessedTables() : mixed
- Add glyf and loca tables
- buildSubsetFont() : mixed
- build new subset font
- findCompositeGlyphs() : array<string|int, mixed>
- Add composite glyphs
- getTableChecksum() : int
- Returs the checksum of a TTF table.
- removeUnusedTables() : mixed
- Remove unused tables
Properties
$fbyte
Object used to read font bytes
protected Byte $fbyte
$fdt
Extracted font metrics
protected array<string|int,
mixed> $fdt = array()
$font
Content of the input font file
protected string $font = ''
$subfont
Subset font
protected string $subfont = ''
$subglyphs
Array containing subset glyphs indexes of chars from cmap table
protected array<string|int,
mixed> $subglyphs = array()
Methods
__construct()
Process TrueType font
public __construct(string $font,
array<string|int,
mixed> $fdt[,
array<string|int,
mixed> $subchars
= array()
]) : mixed
Parameters
- $font : string
-
Content of the input font file
- $fdt : array<string|int, mixed>
-
Extracted font metrics
- $subchars : array<string|int, mixed> = array()
-
Array containing subset chars
Tags
Return values
mixed —getSubsetFont()
Get all the extracted font metrics
public getSubsetFont()
: string
Return values
string —addCompositeGlyphs()
Add composite glyphs
protected addCompositeGlyphs()
: mixed
Return values
mixed —addProcessedTables()
Add glyf and loca tables
protected addProcessedTables()
: mixed
Return values
mixed —buildSubsetFont()
build new subset font
protected buildSubsetFont()
: mixed
Return values
mixed —findCompositeGlyphs()
Add composite glyphs
protected findCompositeGlyphs(array<string|int,
mixed> $new_sga,
int $key)
: array<string|int,
mixed>
Parameters
- $new_sga : array<string|int, mixed>
- $key : int
Return values
array<string|int, mixed> —getTableChecksum()
Returs the checksum of a TTF table.
protected getTableChecksum(string $table,
int $length)
: int
Parameters
- $table : string
-
Table to check
- $length : int
-
Length of table in bytes
Return values
int —checksum
removeUnusedTables()
Remove unused tables
protected removeUnusedTables()
: mixed