Skip to main content

Module text

Module text 

Source
Expand description

Intrinsic text dimension measurement, OpenType shaping, and line breaking facade.

Functions§

font_generation
Returns the current font configuration generation. Caches key on this value so registering new platform measurers invalidates every measurement.
get_family_styled_text_measurer
Retrieves the active registered family-aware styled text measurer callback, if any.
get_family_text_measurer
Retrieves the active registered family-aware text measurer callback, if any.
get_font_metrics
Retrieves the active registered font metrics callback, if any.
get_styled_text_measurer
Retrieves the active registered styled text measurer callback, if any.
get_text_measurer
Retrieves the active registered text measurer callback, if any.
is_monospace_family
layout_inline_text
Advanced text layout returning detailed line boxes, glyph runs, baselines, and geometry.
measure_text_bounds
Measures intrinsic text bounds (width, height) using subpixel typography and line breaking.
measure_text_bounds_ext
Measures intrinsic text bounds with explicit monospace font flag.
measure_text_bounds_styled_with_family
Measures intrinsic text bounds with family, weight, and style information.
measure_text_bounds_with_family
Measures intrinsic text bounds while requesting a specific font family.
measure_text_bounds_with_white_space
Measures intrinsic text bounds honoring the CSS white-space mode.
register_family_styled_text_measurer
Registers a global platform styled text measurement callback that is family aware.
register_family_text_measurer
Registers a global platform text measurement callback that is family aware.
register_font_metrics
Registers a global platform font metrics callback (ascent, descent, line gap).
register_styled_text_measurer
Registers a global platform styled text measurement callback (e.g. PangoCairo).
register_text_measurer
Registers a global platform text measurement callback (e.g. PangoCairo).
text_measure_cache_stats
Returns cumulative (hits, misses) for thread-local text/glyph layout measurement caches.

Type Aliases§

FamilyStyledTextMeasurementCallback
Global styled text measurer callback that also receives the requested font family atom.
FamilyTextMeasurementCallback
Global text measurer callback that also receives the requested font family atom.
FontMetricsCallback
Global font metrics callback returning (ascent_px, descent_px, line_gap_px).
StyledTextMeasurementCallback
Global styled text measurer callback for exact font metrics measurement with weight and style.
TextMeasurementCallback
Global text measurer callback type for exact platform font metrics measurement.