The glyph file format #2

Open
opened 2026-10-18 13:14:57 +00:00 by jimmy · 0 comments
Owner

Part of #1

Goal

Define the glyph file, the format that holds how a letter is made, and load it in Swift.

A file holds one glyph and a format version. The glyph holds the guide line metrics, which are the baseline, the x-height, the cap height, the ascender and the descender, all in em-space. It holds one or more variants, and a variant holds the ordered strokes. A stroke is a list of cubic Bezier segments with a start and an end, so the direction is in the data. A stroke can carry a speed profile, a pressure profile and a nib angle, all optional. A variant carries entry and exit anchors for joins, which nothing uses yet.

Done when the format is written down in docs/, one letter, a, is written by hand in the format, and a Swift test loads it, checks its stroke count and order, and draws its path.

Part of #1 ## Goal Define the glyph file, the format that holds how a letter is made, and load it in Swift. A file holds one glyph and a format version. The glyph holds the guide line metrics, which are the baseline, the x-height, the cap height, the ascender and the descender, all in em-space. It holds one or more variants, and a variant holds the ordered strokes. A stroke is a list of cubic Bezier segments with a start and an end, so the direction is in the data. A stroke can carry a speed profile, a pressure profile and a nib angle, all optional. A variant carries entry and exit anchors for joins, which nothing uses yet. Done when the format is written down in `docs/`, one letter, `a`, is written by hand in the format, and a Swift test loads it, checks its stroke count and order, and draws its path.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
jimmy/ductus#2
No description provided.