Com\Tecnick\Pdf\Font\ImportUtil
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
- findOutputPath() : string
- Find the path where to store the processed font.
- getEncodingDiff() : string
- If required, get differences between the reference encoding (cp1252) and the current encoding
- getEncodingTable() : mixed
- Get the encoding table
- getFontType() : string
- Get the font type
- makeFontName() : string
- Make the output font name
- updateCIDtoGIDmap() : string
- Update the CIDToGIDMap string with a new value
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 = ''
Methods
findOutputPath()
Find the path where to store the processed font.
protected findOutputPath([string $output_path
= null
]) : string
Parameters
- $output_path : string = null
-
Output path for generated font files (must be writeable by the web server). Leave null for default font folder (K_PATH_FONTS).
Return values
string —getEncodingDiff()
If required, get differences between the reference encoding (cp1252) and the current encoding
protected getEncodingDiff()
: string
Return values
string —getEncodingTable()
Get the encoding table
protected getEncodingTable(string|null $encoding)
: mixed
Parameters
- $encoding : string|null
-
Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
Return values
mixed —getFontType()
Get the font type
protected getFontType(string $font_type)
: string
Parameters
- $font_type : string
-
Font type. Leave empty for autodetect mode.
Return values
string —makeFontName()
Make the output font name
protected makeFontName(string $font_file)
: string
Parameters
- $font_file : string
-
Input font file
Return values
string —updateCIDtoGIDmap()
Update the CIDToGIDMap string with a new value
protected updateCIDtoGIDmap(string $map,
int $cid,
int $gid)
: string
Parameters
- $map : string
-
CIDToGIDMap.
- $cid : int
-
CID value.
- $gid : int
-
GID value.