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
$_optimized
private null|array SetaPDF_Core_Font_TrueType_Subset_Table_HorizontalMetrics::$_optimized
The optimized horizontal metrics.
Static Methods
getClassName()
Methods
__construct()
The constructor.
Parameters
addHMetric()
public SetaPDF_Core_Font_TrueType_Subset_Table_HorizontalMetrics::addHMetric (
int $glyphId, int $advanceWidth, int $leftSideBearing
): voidPaired 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
getHMetric()
public SetaPDF_Core_Font_TrueType_Subset_Table_HorizontalMetrics::getHMetric (
int $glyphId
): int[2]Get the horizontal metric by a glyph id.
Parameters
- $glyphId : int
getOriginalTable()
public SetaPDF_Core_Font_TrueType_Subset_Table::getOriginalTable (
void
): SetaPDF_Core_Font_TrueType_TableGets the original table.
write()
Writes the table.
Parameters
- $writer : SetaPDF_Core_Writer_WriterInterface