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

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

Class hierarchy

Summary

Constants

MAC_STYLE_BOLD

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_BOLD = 1

Mac style ids.

MAC_STYLE_CONDENSED

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_CONDENSED = 32

MAC_STYLE_EXTENDED

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_EXTENDED = 64

MAC_STYLE_ITALIC

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_ITALIC = 2

MAC_STYLE_OUTLINE

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_OUTLINE = 8

MAC_STYLE_SHADOW

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_SHADOW = 16

MAC_STYLE_UNDERLINE

const SetaPDF_Core_Font_TrueType_Table_Header::MAC_STYLE_UNDERLINE = 4

TAG

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_Header::$_data = array()

Data of the table

$_entries

protected array SetaPDF_Core_Font_TrueType_Table_Header::$_entries = array(...)

The entries of this table.

$_rawData

protected array SetaPDF_Core_Font_TrueType_Table_Header::$_rawData = array()

Raw binary data read from the file

$_record

protected SetaPDF_Core_Font_TrueType_Table_Record SetaPDF_Core_Font_TrueType_Table_Header::$_record

The main table record.


Static Methods

getClassName()

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

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

Parameters
$tag
 

Methods

_get()

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

Get a value from the table.

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

Parameters
$name
 

_getRaw()

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

Get raw data from a specific table.

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

Parameters
$name
 

cleanUp()

Release memory.

getBoundingBox()

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

Get the bounding box.

Parameters
$recalc : boolean
 

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.

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

Get the fint revision.

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