Module allsorts::glyph_position
source · Expand description
Calculate glyph positions.
GlyphLayout is used to obtain the positions for a collection of shaped glyphs. The position
for each glyph includes its horizontal and vertical advance as well as any (x, y)
offset from
the origin. Horizontal layout in left-to-right and right-to-left directions is supported. Basic
(but incomplete) support for vertical text is present too.
The position of a series of glyphs is determined from an initial pen position, which is
incremented by the advance of each glyph as they are processed. The position of a particular
glyph is the current pen position plus x_offset
and y_offset
.
Structs§
- Used to calculate the position of shaped glyphs.
- The position and advance of a glyph.
Enums§
- The horizontal text layout direction.