Skip to main content

Crate repose_text

Crate repose_text 

Source

Structs§

GlyphBitmap
GlyphKey
ShapedGlyph
TextMetrics

Functions§

begin_frame
Call this at the start of each frame to enable frame-aware caching.
current_frame
ellipsize_line
Return a string truncated to fit max_width at the given px size, appending ‘…’ if truncated.
extract_outline_commands
Extract vector outline commands for a glyph (uncached - caller should cache). Returns quadratic + cubic bezier commands in font-unit scaled coordinates.
lookup_and_extract_outline
Look up the CacheKey for a GlyphKey and extract outline commands in one engine lock. Returns None if the GlyphKey isn’t in the key map or extraction fails.
lookup_cache_key
Look up the full CacheKey for a compact GlyphKey.
metrics_for_textfield
Computes caret mapping using shaping (no wrapping). font_family optionally overrides the default font (e.g. “Material Symbols Outlined”).
rasterize
register_font_data
Register a font blob into the global FontSystem.
shape_line
wrap_line_ranges
Like wrap_lines, but returns byte ranges into the original text for each visual line. This is required for multi-line editing so caret/selection mapping stays correct.
wrap_lines
Greedy wrap into lines that fit max_width. Prefers breaking at whitespace, falls back to grapheme boundaries. If max_lines is Some and we truncate, caller can choose to ellipsize the last visible line.