Font::TTF::Hmtx(3) User Contributed Perl Documentation Font::TTF::Hmtx(3)

# [NAME](#NAME)

Font::TTF::Hmtx - Horizontal Metrics

# [DESCRIPTION](#DESCRIPTION)

Contains the advance width and left side bearing for each glyph. Given the compressability of the data onto disk, this table uses information from other tables, and thus must do part of its output during the output of other tables

# [INSTANCE VARIABLES](#INSTANCE_VARIABLES)

The horizontal metrics are kept in two arrays by glyph id. The variable names do not start with a space

[advance](#advance)

An array containing the advance width for each glyph

[lsb](#lsb)

An array containing the left side bearing for each glyph

# [METHODS](#METHODS)

## [$t-&gt;read](#$t)

Reads the horizontal metrics from the TTF file into memory

## [$t-&gt;numMetrics](#$t~2)

Calculates again the number of long metrics required to store the information here. Returns undef if the table has not been read.

## [$t-&gt;out($fh)](#$t~3)

Writes the metrics to a TTF file. Assumes that the "hhea" has updated the numHMetrics from here

## [$t-&gt;update](#$t~4)

Updates the lsb values from the xMin from the each glyph

## $t-&gt;out\_xml($context, $depth)

Outputs the table in XML

# [BUGS](#BUGS)

None known

# [AUTHOR](#AUTHOR)

Martin Hosken &lt;http://scripts.sil.org/FontUtils&gt;.

# [LICENSING](#LICENSING)

Copyright (c) 1998-2016, SIL International (http://www.sil.org)

This module is released under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.

2026-09-25 perl v5.44.0

---

Document: Font::TTF::Hmtx(3pm) from perl-font-ttf 1.06-r0 (Chainguard OS)
