Module text

Module text 

Source
Expand description

Text Rendering Pipeline for UI Components

This module implements the GPU pipeline and related utilities for efficient text rendering in Tessera UI components. It leverages the Glyphon engine for font management, shaping, and rasterization, providing high-quality and performant text output. Typical use cases include rendering static labels, paragraphs, and editable text fields within the UI.

The pipeline is designed to be reusable and efficient, sharing a static font system across the application to minimize resource usage. It exposes APIs for preparing, measuring, and rendering text, supporting advanced features such as font fallback, shaping, and multi-line layout.

This module is intended for integration into custom UI components and rendering flows that require flexible and robust text display.

Structs§

GlyphonTextRender
A text renderer Pipeline for rendering text using the Glyphon engine.
TextCommand
TextConstraint
Describes size constraints for a text draw
TextData
Text data for rendering, including buffer and size.

Functions§

read_font_system
It costs a lot to create a glyphon font system, so we use a static one to share it every where and avoid creating it multiple times. This function returns a read lock of the font system.
write_font_system
It costs a lot to create a glyphon font system, so we use a static one to share it every where and avoid creating it multiple times. This function returns a write lock of the font system.