Generate afm metrics #5

Open
opened 2024-01-07 00:26:40 +01:00 by belka · 0 comments
Owner

ttf2afm gives output that contains widths of all grlyphs. This information is required to embed fonts in PDF.

To calculate the width:

  • Get the unitsPerEm from the head table.
  • Get advanced width for each glyph from the hmtx table.

Calculate:

                     n               remainder(n, unitsPerEm) 1000
        f(n) := (----------) 1000 + ------------------------------
                 unitsPerEm                  unitsPerEm

where n is the advanced width.

ttf2afm gives output that contains widths of all grlyphs. This information is required to embed fonts in PDF. To calculate the width: - Get the `unitsPerEm` from the `head` table. - Get advanced width for each glyph from the `hmtx` table. Calculate: ``` n remainder(n, unitsPerEm) 1000 f(n) := (----------) 1000 + ------------------------------ unitsPerEm unitsPerEm ``` where n is the advanced width.
belka added the
Kind
enhancement
label 2024-01-07 00:26:40 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OSS/fountainhead#5
No description provided.