|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| LayoutResult MayaFlux::Portal::Text::lay_out | ( | std::string_view | text, |
| GlyphAtlas & | atlas, | ||
| float | pen_x = 0.F, |
||
| float | pen_y = 0.F, |
||
| uint32_t | wrap_w = 0 |
||
| ) |
Lay out a UTF-8 string into a sequence of screen-space quads.
Handles
(advance pen_y by atlas.line_height(), reset pen_x to the initial value) and \r (consumed silently). All other control codepoints with no glyph in the face are skipped without advancing the pen.
Bidirectional reordering and shaping are not performed. HarfBuzz slots in before the glyph index step when needed; the quad assembly loop and GlyphAtlas remain unchanged.
| text | UTF-8 encoded input string. |
| atlas | GlyphAtlas to query and populate. May be modified (dirty flag set) if new glyphs are rasterized. |
| pen_x | Starting horizontal pen position in pixels. |
| pen_y | Starting vertical pen position in pixels (baseline). |
Definition at line 9 of file TypeSetter.cpp.
References MayaFlux::Portal::Text::GlyphMetrics::advance_x, MayaFlux::Journal::API, MayaFlux::Portal::Text::GlyphMetrics::bearing_x, MayaFlux::Portal::Text::GlyphMetrics::bearing_y, MayaFlux::Portal::Text::LayoutResult::final_pen_x, MayaFlux::Portal::Text::LayoutResult::final_pen_y, MayaFlux::Portal::Text::GlyphAtlas::get_or_rasterize(), MayaFlux::Portal::Text::GlyphMetrics::height, MayaFlux::Portal::Text::GlyphAtlas::line_height(), MF_WARN, MayaFlux::Journal::Portal, q, MayaFlux::Portal::Text::LayoutResult::quads, MayaFlux::Portal::Text::GlyphMetrics::uv_x0, MayaFlux::Portal::Text::GlyphMetrics::uv_x1, MayaFlux::Portal::Text::GlyphMetrics::uv_y0, MayaFlux::Portal::Text::GlyphMetrics::uv_y1, MayaFlux::Portal::Text::GlyphMetrics::width, and MayaFlux::Portal::Text::GlyphQuad::x0.
Referenced by create_layout(), and impress().
Here is the call graph for this function:
Here is the caller graph for this function: