Documentation

Parser
in package

Pdf font parser class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.2.0

Table of Contents

$compression  : bool
Font compression flag
$font  : AbstractFont
Font object
$fontDescIndex  : int
Font descriptor index
$fontFileIndex  : int
Font file index
$fontIndex  : int
Font reference index
$fontObjectIndex  : int
Font object index
$objects  : array<string|int, mixed>
Font objects
__construct()  : mixed
Constructor
getFont()  : AbstractFont
Get the font object
getFontDescIndex()  : int
Get the font descriptor index
getFontFileIndex()  : int
Get the font file index
getFontIndex()  : int
Get the font index
getFontName()  : string
Method to get the font name.
getFontObjectIndex()  : int
Get the font object index
getFontReference()  : string
Method to get the font reference.
getObjects()  : array<string|int, mixed>
Get the font objects
isCompressed()  : bool
Get whether or not the font objects are compressed
isEmbeddable()  : bool
Method to get if the font is embeddable.
loadFromStream()  : void
Load font from stream
parse()  : void
Parse the font data and create the font objects
setCompression()  : Parser
Set the compression
setFontDescIndex()  : Parser
Set the font descriptor index
setFontFileIndex()  : Parser
Set the font file index
setFontIndex()  : Parser
Set the font index
setFontObjectIndex()  : Parser
Set the font object index
getGlyphWidthsFromCmap()  : array<string|int, mixed>
Method to to get the glyph widths from the CMap

Properties

$compression

Font compression flag

protected bool $compression = false

$fontDescIndex

Font descriptor index

protected int $fontDescIndex = null

$fontFileIndex

Font file index

protected int $fontFileIndex = null

$fontIndex

Font reference index

protected int $fontIndex = null

$fontObjectIndex

Font object index

protected int $fontObjectIndex = null

$objects

Font objects

protected array<string|int, mixed> $objects = []

Methods

__construct()

Constructor

public __construct(string $fontFile[, bool $compression = false ]) : mixed

Instantiate a font parser object

Parameters
$fontFile : string
$compression : bool = false
Tags
throws
Exception
Return values
mixed

getFontDescIndex()

Get the font descriptor index

public getFontDescIndex() : int
Return values
int

getFontFileIndex()

Get the font file index

public getFontFileIndex() : int
Return values
int

getFontIndex()

Get the font index

public getFontIndex() : int
Return values
int

getFontName()

Method to get the font name.

public getFontName() : string
Return values
string

getFontObjectIndex()

Get the font object index

public getFontObjectIndex() : int
Return values
int

getFontReference()

Method to get the font reference.

public getFontReference() : string
Return values
string

getObjects()

Get the font objects

public getObjects() : array<string|int, mixed>
Return values
array<string|int, mixed>

isCompressed()

Get whether or not the font objects are compressed

public isCompressed() : bool
Return values
bool

isEmbeddable()

Method to get if the font is embeddable.

public isEmbeddable() : bool
Return values
bool

loadFromStream()

Load font from stream

public static loadFromStream(string $stream) : void
Parameters
$stream : string
Return values
void

parse()

Parse the font data and create the font objects

public parse() : void
Tags
throws
Exception
Return values
void

setCompression()

Set the compression

public setCompression(bool $compression) : Parser
Parameters
$compression : bool
Return values
Parser

setFontDescIndex()

Set the font descriptor index

public setFontDescIndex(int $index) : Parser
Parameters
$index : int
Return values
Parser

setFontFileIndex()

Set the font file index

public setFontFileIndex(int $index) : Parser
Parameters
$index : int
Return values
Parser

setFontIndex()

Set the font index

public setFontIndex(int $index) : Parser
Parameters
$index : int
Return values
Parser

setFontObjectIndex()

Set the font object index

public setFontObjectIndex(int $index) : Parser
Parameters
$index : int
Return values
Parser

getGlyphWidthsFromCmap()

Method to to get the glyph widths from the CMap

protected getGlyphWidthsFromCmap(Cmap $cmap) : array<string|int, mixed>
Parameters
$cmap : Cmap
Return values
array<string|int, mixed>

Search results