PHP Class Pop\Font\AbstractFont

Author: Nick Sagona, III ([email protected])
Inheritance: extends Pop\File\File
Exibir arquivo Open project: nicksagona/PopPHP Class Usage Examples

Public Properties

Property Type Description
$ascent integer Font ascent value
$bBox ArrayObject Font bounding box info
$capHeight integer Font cap height value
$descent integer Font descent value
$embeddable boolean Font embeddable flag
$flags ArrayObject Font flags
$glyphWidths array Font glyph widths
$info mixed Font info
$italicAngle float Font italic angle value
$missingWidth integer Missing glyph width
$numberOfGlyphs integer Font number of glyphs value
$numberOfHMetrics integer Font number of horizontal metrics value
$stemH integer Font StemH value
$stemV integer Font StemV value
$unitsPerEm integer Font units per EM value

Protected Properties

Property Type Description
$allowed array Array of allowed file types.

Public Methods

Method Description
__construct ( string $font ) : AbstractFont Constructor
calcFlags ( ) : integer Method to calculate the font flags
readFixed ( integer $mantissaBits, integer $fractionBits, string $bytes ) : integer Static method to read and return a fixed-point number
readInt ( integer $size, string $bytes ) : integer Static method to read and return a signed integer
shiftToSigned ( integer | array $values ) : integer | array Method to shift an unpacked signed short from little endian to big endian
toEmSpace ( integer $value ) : integer Method to convert a value to the representative value in EM.

Method Details

__construct() public method

Instantiate a font file object based on a pre-existing font file on disk.
public __construct ( string $font ) : AbstractFont
$font string
return AbstractFont

calcFlags() public method

Method to calculate the font flags
public calcFlags ( ) : integer
return integer

readFixed() public method

Static method to read and return a fixed-point number
public readFixed ( integer $mantissaBits, integer $fractionBits, string $bytes ) : integer
$mantissaBits integer
$fractionBits integer
$bytes string
return integer

readInt() public method

Static method to read and return a signed integer
public readInt ( integer $size, string $bytes ) : integer
$size integer
$bytes string
return integer

shiftToSigned() public method

Method to shift an unpacked signed short from little endian to big endian
public shiftToSigned ( integer | array $values ) : integer | array
$values integer | array
return integer | array

toEmSpace() public method

Method to convert a value to the representative value in EM.
public toEmSpace ( integer $value ) : integer
$value integer
return integer

Property Details

$allowed protected_oe property

Array of allowed file types.
protected array $allowed
return array

$ascent public_oe property

Font ascent value
public int $ascent
return integer

$bBox public_oe property

Font bounding box info
public ArrayObject $bBox
return ArrayObject

$capHeight public_oe property

Font cap height value
public int $capHeight
return integer

$descent public_oe property

Font descent value
public int $descent
return integer

$embeddable public_oe property

Font embeddable flag
public bool $embeddable
return boolean

$flags public_oe property

Font flags
public ArrayObject $flags
return ArrayObject

$glyphWidths public_oe property

Font glyph widths
public array $glyphWidths
return array

$info public_oe property

Font info
public mixed $info
return mixed

$italicAngle public_oe property

Font italic angle value
public float $italicAngle
return float

$missingWidth public_oe property

Missing glyph width
public int $missingWidth
return integer

$numberOfGlyphs public_oe property

Font number of glyphs value
public int $numberOfGlyphs
return integer

$numberOfHMetrics public_oe property

Font number of horizontal metrics value
public int $numberOfHMetrics
return integer

$stemH public_oe property

Font StemH value
public int $stemH
return integer

$stemV public_oe property

Font StemV value
public int $stemV
return integer

$unitsPerEm public_oe property

Font units per EM value
public int $unitsPerEm
return integer