setasign\SetaPDF2\Core\Font\TrueType\Table

HorizontalMetrics A class representing the Horizontal Metrics Table (hmtx) in a TrueType file. https://www.microsoft.com/typography/otspec/hmtx.htm

File: /SetaPDF v2/Core/Font/TrueType/Table/HorizontalMetrics.php
Old class name (alias): \SetaPDF_Core_Font_TrueType_Table_HorizontalMetrics

Class hierarchy

Summary

Constants

TAG

public const string HorizontalMetrics::TAG = 'hmtx'

The tag name of this class


Properties

$_data

protected array AbstractTable::$_data = array()

Data of the table

$_entries

protected array AbstractTable::$_entries = array()

Configuration about table entries

$_rawData

protected array AbstractTable::$_rawData = array()

Raw binary data read from the file

$_record


Static Methods

getClassName()

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

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

Parameters
$tag : string
 

Methods

__construct()

_ensureHMetrics()

protected HorizontalMetrics::_ensureHMetrics (
int $glyphId
): void

Ensures the metrics of a specific glyph.

Parameters
$glyphId : int
 

_get()

protected AbstractTable::_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
 

_getNumberOfMetrics()

private HorizontalMetrics::_getNumberOfMetrics (
void
): int

Get the number of metrics.

_getRaw()

protected AbstractTable::_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()

public AbstractTable::cleanUp (
void
): void

Release memory.

getAdvanceWidth()

public HorizontalMetrics::getAdvanceWidth (
int $glyphId
): int

Get the advance width of a specific glyph.

Parameters
$glyphId : int
 

getEntry()

public AbstractTable::getEntry (
$name
): void
Parameters
$name
 

getLeftSideBearing()

public HorizontalMetrics::getLeftSideBearing (
int $glyphId
): int

Get the left side bearing of a specifc glyph.

Parameters
$glyphId : int
 

getRecord()

Get the record object.