SetaPDF_Core_Font_TrueType_Table_Header A class representing the Font Header Table (head) in a TrueType file. https://www.microsoft.com/typography/otspec/head.htm

File: /SetaPDF v2/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

public const string SetaPDF_Core_Font_TrueType_Table_Header::TAG = 'head'

The tag name of this class


Properties

$_data

protected array SetaPDF_Core_Font_TrueType_Table::$_data = array()

Data of the table

$_entries

The entries of this table.

$_rawData

protected array SetaPDF_Core_Font_TrueType_Table::$_rawData = array()

Raw binary data read from the file


Static Methods

getClassName()

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

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

Parameters
$tag : string
 

Methods

_get()

protected SetaPDF_Core_Font_TrueType_Table::_get (
string $name
): mixed

Get a value from the table.

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

Parameters
$name : string
 

_getRaw()

protected SetaPDF_Core_Font_TrueType_Table::_getRaw (
string $name
): mixed

Get raw data from a specific table.

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

Parameters
$name : string
 

cleanUp()

Release memory.

getBoundingBox()

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

Get the bounding box.

Parameters
$recalc : bool
 
Exceptions

Throws SetaPDF_Core_Font_Exception

getCheckSumAdjustment()

Get the check sum adjustment.

getCreated()

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.

getEntry()

Parameters
$name
 

getFlags()

Get the font flags.

getFontDirectionHint()

Get the font direction hint (deprecated).

getGlyphDataFormat()

Get glyph data format.

getIndexToLocFormat()

Get index to location format.

Return Values

0 for short offsets, 1 for long.

getLowestRecPPEM()

Get the smallest readable size in pixels.

getMacStyle()

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()

Get the magic number.

getModified()

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()

getRevision()

public SetaPDF_Core_Font_TrueType_Table_Header::getRevision (
[ boolean $round = true ]
): float

Get the font revision.

Parameters
$round : boolean
 

getUnitsPerEm()

Get the units per em value.

getVersion()

Get the version (major.minor)

getXMax()

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

getXMin()

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

getYMax()

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

getYMin()

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

hasMacStyle()

public SetaPDF_Core_Font_TrueType_Table_Header::hasMacStyle (
integer $style
): boolean

Checks whether a mac style is set or not.

Parameters
$style : integer