PHP Class Pop\Pdf\Parser\Font

Author: Nick Sagona, III ([email protected])
Show file Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$compress boolean Font compress flag
$font mixed Font object
$fontDescIndex integer Font descriptor index
$fontFileIndex integer Font file index
$fontIndex integer Font reference index
$objectIndex integer Font object index
$objects array Font objects

Public Methods

Method Description
__construct ( string $fle, integer $fi, integer $oi, boolean $comp = false ) : Font Constructor
getFontName ( ) : string Method to get the font name.
getFontRef ( ) : string Method to get the font reference.
getObjects ( ) : array Method to get the font objects.
isEmbeddable ( ) : boolean Method to get if the font is embeddable.

Protected Methods

Method Description
calcByteLength ( string $str ) : integer Method to calculate byte length.
createFontObjects ( ) : void Method to create the font objects.
getGlyphWidths ( Cmap $cmap ) : array Method to to get the glyph widths

Method Details

__construct() public method

Instantiate a font parser object to be used by Pop_Pdf.
public __construct ( string $fle, integer $fi, integer $oi, boolean $comp = false ) : Font
$fle string
$fi integer
$oi integer
$comp boolean
return Font

calcByteLength() protected method

Method to calculate byte length.
protected calcByteLength ( string $str ) : integer
$str string
return integer

createFontObjects() protected method

Method to create the font objects.
protected createFontObjects ( ) : void
return void

getFontName() public method

Method to get the font name.
public getFontName ( ) : string
return string

getFontRef() public method

Method to get the font reference.
public getFontRef ( ) : string
return string

getGlyphWidths() protected method

Method to to get the glyph widths
protected getGlyphWidths ( Cmap $cmap ) : array
$cmap Pop\Font\TrueType\Table\Cmap
return array

getObjects() public method

Method to get the font objects.
public getObjects ( ) : array
return array

isEmbeddable() public method

Method to get if the font is embeddable.
public isEmbeddable ( ) : boolean
return boolean

Property Details

$compress protected property

Font compress flag
protected bool $compress
return boolean

$font protected property

Font object
protected mixed $font
return mixed

$fontDescIndex protected property

Font descriptor index
protected int $fontDescIndex
return integer

$fontFileIndex protected property

Font file index
protected int $fontFileIndex
return integer

$fontIndex protected property

Font reference index
protected int $fontIndex
return integer

$objectIndex protected property

Font object index
protected int $objectIndex
return integer

$objects protected property

Font objects
protected array $objects
return array