SetaPDF_Core_Font_TrueType_Subset_Table_HorizontalMetrics This class represents the "hmtx" table in a sub-setting context.

File: /SetaPDF v2/Core/Font/TrueType/Subset/Table/HorizontalMetrics.php

See https://www.microsoft.com/typography/otspec/hmtx.htm for more details.

Class hierarchy

Summary

Properties

$_changedData

The modified data.

$_hMetrics

The horizontal metrics.

$_optimized

The optimized horizontal metrics.


Static Methods

getClassName()

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

Get a class name by tag name.

Parameters
$tag : string
 
Exceptions

Throws InvalidArgumentException


Methods

addHMetric()

public SetaPDF_Core_Font_TrueType_Subset_Table_HorizontalMetrics::addHMetric (
int $glyphId, int $advanceWidth, int $leftSideBearing
): void

Paired advance width and left side bearing values for each glyph.

Records are indexed by glyph id. There is no glyph id gap allowed in the data that gets added.

Parameters
$glyphId : int
 
$advanceWidth : int
 
$leftSideBearing : int
 

cleanUp()

Release memory and cycled references.

getHMetric()

Get the horizontal metric by a glyph id.

Parameters
$glyphId : int
 

getOriginalTable()

optimize()

Optimizes the horizontal metrics data.

Return Values

The optimized horizontal metrics.