Com\Tecnick\Pdf\Font\Output
Tags
Table of Contents
- $enc : Encrypt
- Encrypt object
- $fonts : array<string|int, mixed>
- Array of imported fonts data
- $map : array<string|int, mixed>
- Map methods used to process each font type
- $out : string
- PDF string block to return containinf the fonts definitions
- $pon : int
- Current PDF object number
- $subchars : array<string|int, mixed>
- Array of character subsets for each font file
- __construct() : mixed
- Initialize font data
- getFontsBlock() : string
- Returns the PDF fonts block
- getObjectNumber() : int
- Returns current PDF object number
- getCharWidths() : string
- Outputs font widths
- getCid0() : mixed
- Get the PDF output string for a CID-0 font.
- getCore() : mixed
- Get the PDF output string for a Core font.
- getEncodingDiffs() : mixed
- Get the PDF output string for font encoding diffs
- getFontDefinitions() : mixed
- Get the PDF output string for fonts
- getFontFiles() : mixed
- Get the PDF output string for font files
- getFontFullPath() : string
- Return font full path
- getKeyValOut() : string
- Returns the formatted key/value PDF string
- getTrueType() : mixed
- Get the PDF output string for a Core font.
- getTrueTypeUnicode() : mixed
- Get the PDF output string for a TrueTypeUnicode font.
- getWidthRanges() : array<string|int, mixed>
- get width ranges of characters
- optimizeWidthRanges() : array<string|int, mixed>
- Optimize width ranges
- uniToCid() : array<string|int, mixed>
- Convert Unicode to CID
Properties
$enc
Encrypt object
protected Encrypt
$enc
$fonts
Array of imported fonts data
protected array<string|int,
mixed> $fonts
$map
Map methods used to process each font type
protected static array<string|int,
mixed> $map = array('core' =>
'getCore', 'cidfont0' => 'getCid0', 'type1' => 'getTrueType',
'truetype' => 'getTrueType', 'truetypeunicode' =>
'getTrueTypeUnicode')
$out
PDF string block to return containinf the fonts definitions
protected string $out = ''
$pon
Current PDF object number
protected int $pon
$subchars
Array of character subsets for each font file
protected array<string|int,
mixed> $subchars = array()
Methods
__construct()
Initialize font data
public __construct(array<string|int,
mixed> $fonts,
int $pon,
Encrypt $enc)
: mixed
Parameters
- $fonts : array<string|int, mixed>
- $pon : int
-
Current PDF Object Number
- $enc : Encrypt
-
Encrypt object
Return values
mixed —getFontsBlock()
Returns the PDF fonts block
public getFontsBlock()
: string
Return values
string —getObjectNumber()
Returns current PDF object number
public getObjectNumber()
: int
Return values
int —getCharWidths()
Outputs font widths
protected getCharWidths(array<string|int,
mixed> $font,
int $cidoffset)
: string
Parameters
- $font : array<string|int, mixed>
-
Font to process
- $cidoffset : int
-
Offset for CID values
Return values
string —PDF command string for font widths
getCid0()
Get the PDF output string for a CID-0 font.
protected getCid0(array<string|int,
mixed> $font)
: mixed
A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
Parameters
- $font : array<string|int, mixed>
-
Font to process
return string
Return values
mixed —getCore()
Get the PDF output string for a Core font.
protected getCore(array<string|int,
mixed> $font)
: mixed
Parameters
- $font : array<string|int, mixed>
-
Font to process
return string
Return values
mixed —getEncodingDiffs()
Get the PDF output string for font encoding diffs
protected getEncodingDiffs()
: mixed
return string
Return values
mixed —getFontDefinitions()
Get the PDF output string for fonts
protected getFontDefinitions()
: mixed
return string
Return values
mixed —getFontFiles()
Get the PDF output string for font files
protected getFontFiles()
: mixed
return string
Return values
mixed —getFontFullPath()
Return font full path
protected getFontFullPath(string $fontdir,
string $file)
: string
Parameters
- $fontdir : string
-
Original font directory
- $file : string
-
Font file name.
Return values
string —Font full path or empty string
getKeyValOut()
Returns the formatted key/value PDF string
protected getKeyValOut(string $key,
mixed $val)
: string
Parameters
- $key : string
-
Key name
- $val : mixed
Return values
string —getTrueType()
Get the PDF output string for a Core font.
protected getTrueType(array<string|int,
mixed> $font)
: mixed
Parameters
- $font : array<string|int, mixed>
-
Font to process
return string
Return values
mixed —getTrueTypeUnicode()
Get the PDF output string for a TrueTypeUnicode font.
protected getTrueTypeUnicode(array<string|int,
mixed> $font)
: mixed
Based on PDF Reference 1.3 (section 5)
Parameters
- $font : array<string|int, mixed>
-
Font to process
return string
Tags
Return values
mixed —getWidthRanges()
get width ranges of characters
protected getWidthRanges(array<string|int,
mixed> $font,
int $cidoffset)
: array<string|int,
mixed>
Parameters
- $font : array<string|int, mixed>
-
Font to process
- $cidoffset : int
-
Offset for CID values
Return values
array<string|int, mixed> —optimizeWidthRanges()
Optimize width ranges
protected optimizeWidthRanges(array<string|int,
mixed> $range)
: array<string|int,
mixed>
Parameters
- $range : array<string|int, mixed>
-
Widht Ranges
Return values
array<string|int, mixed> —uniToCid()
Convert Unicode to CID
protected uniToCid(array<string|int,
mixed> &$font,
int $cidoffset)
: array<string|int,
mixed>
Parameters
- $font : array<string|int, mixed>
-
Font to process
- $cidoffset : int
-
Offset for CID values
Return values
array<string|int, mixed> —Processed font