SetaPDF_Core_Font_TrueType_Table_Header A class representing the Font Header Table (head) in a TrueType file.

File: /SetaPDF/Core/Font/TrueType/Table/Header.php

Class hierarchy

Summary

Constants

MAC_STYLE_BOLD

MAC_STYLE_CONDENSED

MAC_STYLE_EXTENDED

MAC_STYLE_ITALIC

MAC_STYLE_OUTLINE

MAC_STYLE_SHADOW

MAC_STYLE_UNDERLINE

TAG

The tag name of this class


Properties

$_data

Data of the table

$_entries

The entries of this table.

$_rawData

Raw binary data read from the file


Static Methods

getClassName()

static public string SetaPDF_Core_Font_TrueType_Table::getClassName ( $tag $tag )

Get a class name for a specific table by its tag name.

Parameters
$tag : $tag
 

Methods

__construct()

public SetaPDF_Core_Font_TrueType_Table::__construct ( SetaPDF_Core_Font_TrueType_Table_Record $record )

The constructor.

Parameters
$record : SetaPDF_Core_Font_TrueType_Table_Record
 

_get()

protected integer|float|mixed|null SetaPDF_Core_Font_TrueType_Table::_get ( $name $name )

Get a value from the table.

The properties are defined in the $_entries property of an implemented table.

Parameters
$name : $name
 

_getRaw()

protected mixed|null SetaPDF_Core_Font_TrueType_Table::_getRaw ( $name $name )

Get raw data from a specific table.

The properties are defined in the $_entries property of an implemented table.

Parameters
$name : $name
 

cleanUp()

public void SetaPDF_Core_Font_TrueType_Table::cleanUp ( void )

Release memory.

getBoundingBox()

public array SetaPDF_Core_Font_TrueType_Table_Header::getBoundingBox ( [ boolean $recalc = false ] )

Get the bounding box.

Parameters
$recalc : boolean
 

getCheckSumAdjustment()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getCheckSumAdjustment ( void )

Get the check sum adjustment.

getCreated()

public string SetaPDF_Core_Font_TrueType_Table_Header::getCreated ( void )

Get the number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone when the font was created.

Return Values

The raw data representing the LONGDATETIME data type.

getFlags()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getFlags ( void )

Get the font flags.

getFontDirectionHint()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getFontDirectionHint ( void )

Get the font direction hint (deprecated).

getGlyphDataFormat()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getGlyphDataFormat ( void )

Get glyph data format.

getIndexToLocFormat()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getIndexToLocFormat ( void )

Get index to location format.

Return Values

0 for short offsets, 1 for long.

getLowestRecPPEM()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getLowestRecPPEM ( void )

Get the smallest readable size in pixels.

getMacStyle()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getMacStyle ( void )

Get the MacStyle

Bit 0: Bold (if set to 1); Bit 1: Italic (if set to 1) Bit 2: Underline (if set to 1) Bit 3: Outline (if set to 1) Bit 4: Shadow (if set to 1) Bit 5: Condensed (if set to 1) Bit 6: Extended (if set to 1) Bits 7-15: Reserved (set to 0).

getMagicNumber()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getMagicNumber ( void )

Get the magic number.

getModified()

public string SetaPDF_Core_Font_TrueType_Table_Header::getModified ( void )

Get the number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone when the font was modifed.

Return Values

The raw data representing the LONGDATETIME data type.

getRecord()

public SetaPDF_Core_Font_TrueType_Table_Record SetaPDF_Core_Font_TrueType_Table::getRecord ( void )

Get the record object.

getRevision()

public float SetaPDF_Core_Font_TrueType_Table_Header::getRevision ( void )

Get the fint revision.

getUnitsPerEm()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getUnitsPerEm ( void )

Get the units per em value.

getVersion()

public float SetaPDF_Core_Font_TrueType_Table_Header::getVersion ( void )

Get the version (major.minor)

getXMax()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getXMax ( void )

Get the x-max value for all glyph bounding boxes.

getXMin()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getXMin ( void )

Get the x-min value for all glyph bounding boxes.

getYMax()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getYMax ( void )

Get the y-max value for all glyph bounding boxes.

getYMin()

public integer SetaPDF_Core_Font_TrueType_Table_Header::getYMin ( void )

Get the y-min value for all glyph bounding boxes.

hasMacStyle()

public boolean SetaPDF_Core_Font_TrueType_Table_Header::hasMacStyle ( integer $style )

Checks whether a mac style is set or not.

Parameters
$style : integer