Skip to main content

Module text3

Module text3 

Source
Expand description

Text shaping, line breaking (Knuth-Plass), and inline formatting. Text layout and shaping system.

This module provides text shaping, inline layout, editing, selection, and font caching. Submodules:

  • cache: unified text layout cache (UnifiedLayout)
  • default: default text shaping and line-breaking
  • edit: text editing operations
  • glyphs: glyph positioning and cluster mapping
  • knuth_plass: Knuth-Plass line-breaking algorithm
  • mock_fonts: built-in test fonts with exactly known metrics
  • script: Unicode script detection
  • selection: text selection and cursor utilities

Modulesยง

cache
Core types and layout pipeline for the text/inline formatting context.
default
Default / concrete implementations of the text3 trait abstractions.
edit
Pure functions for editing a Vec<InlineContent> based on selections.
glyphs
A helper module to extract final, absolute glyph positions from a layout. This is useful for renderers that work with simple lists of glyphs.
knuth_plass
An implementation of the Knuth-Plass line-breaking algorithm for simple rectangular layouts.
mock_fonts
Built-in MOCK FONTS with fully controlled metrics.
script
Unicode script detection and language identification for text shaping
selection
Text selection helper functions