pub enum CharType {
Normal,
Generated,
NotUnicode,
Hyphen,
Piece,
ActualText,
}Expand description
Where a character came from, which decides how the rest of the pipeline treats it.
The distinction that matters most: a space written in the content
stream is Normal, not Generated.
“Generated” means the extractor invented the character because the
geometry implied one — an inter-word gap, an inter-object gap, or a line
break’s \r\n.
Variants§
Normal
A character the font decoded from the content stream.
Generated
A space or line break the extractor invented from the geometry.
NotUnicode
A character code the font could not map to Unicode; its unicode is
the raw character code.
Hyphen
The soft hyphen at a line break.
Its unicode is forced to 0x0002, while
TextPage::search_text carries
U+00AD at the same position — the one place the character stream and
the search-facing text provably disagree.
Piece
One piece of a character that normalization split into several.
ActualText
A character synthesized from a marked-content /ActualText string
rather than from any glyph.