Skip to main content

Module text

Module text 

Source
Expand description

epaint’s text engine behind [TextLayout], twice over: the context’s own fonts at the display’s resolution, which is what a frame drawn on screen is measured through, and a standalone engine at one pixel per point for a backendless consumer (the exporters), handed the layout glyph for glyph.

Structs§

ContextLayout
The fonts a context has installed, behind [TextLayout] — the very engine the screen draws with, at the display’s resolution, so a run recorded through it is the size the replay draws it. Not an export’s engine: what this measures inherits the display’s DPI, which is the point of it.
EpaintLayout
A standalone [Fonts] with the app’s faces installed — the very engine that lays the diagram out on screen, driven without a Context.

Constants§

PIXELS_PER_POINT 🔒
Text is laid out resolution-independently, so no display’s DPI is baked into what the layout says.

Functions§

layout_of 🔒
A galley as the trait states it. Both engines lay out to be measured or traced, never blitted: whatever draws the glyphs sets its own ink, so they are laid out in epaint’s “recolor me” sentinel rather than a color.