1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Positioned glyph type.
//!
//! A [`Char`] is the unit of output of the PDF parser. Each glyph drawn by
//! the content stream becomes one `Char` with its decoded Unicode text and
//! its position on the page in **top-down** coordinates (origin at the
//! top-left of the page).
use CompactString;
/// A single positioned glyph extracted from a PDF page.
///
/// One PDF glyph operator (`Tj`, `TJ`, `'`, `"`) typically produces one or
/// more `Char` instances — one per visible glyph. Ligatures like `fi` are
/// preserved as a single `Char` whose `text` is `"fi"`; they can be expanded
/// to `"fi"` via [`crate::text::ligatures::expand`].