Skip to main content

Module text

Module text 

Source
Expand description

Text extraction via a custom Device implementation.

Structs§

FontMetrics
Vertical font metrics in /1000 em (1000 units-per-em), sourced from the embedded font’s OS/2 / hhea tables via skrifa. ascent is positive (above the baseline); descent is negative (below it). The whole struct is None on a span when no embedded font binary exposes metrics (non-embedded standard-14, CFF, Type1, Type3).
TextBlock
A block of text (grouped by reading order).
TextSpan
A single text span at a specific position.

Enums§

BoundsSource
Provenance of per-glyph bounding boxes.
GeometryMode
Controls the richness of per-glyph geometry extraction.
WidthSource
Whether a text span’s width was computed from real font metrics or estimated.