Level 4 · Recognition method
Type, decoration, and color
Native PDFs expose font and paint facts directly. Scanned pages require inference from pixels. Text-reading confidence and appearance confidence remain separate.
Emphasis
Bold and italic
Native evidence
PDF font flags, normalized font name, weight or slant, text-rendering mode, and glyph outline or stroke measurements.
Scanned evidence
Word-relative stem width, ink mass, slant, spacing, and scale-stable comparison with a local family or style cohort.
Run smoothing may fill a short gap only when both neighbors share the style and the gap is visually compatible. One heavy token cannot make a whole paragraph bold. Resolved runs map to **bold**, *italic*, or ***bold italic***.
Exact typeface
Font identity is a harder, separate decision
For scanned text, the system compares eligible words and lines with a verified catalog using glyph shape, spacing, renderer-conditioned descriptors, and non-emitting guard fonts. Document-wide work is bounded and selected deterministically. If the best match is not separated sufficiently from alternatives or guards, the output must abstain.
Decoration and scripts
Position relative to the local text
Local medians are used instead of one absolute font size. Prefix, infix, suffix, and multi-character script runs are allowed.
Paint
Foreground color is not highlighting
Native extraction reads text fill and stroke colors, color-space conversion, opacity, annotations, and paint order. Scan analysis masks glyphs so ink pixels are measured separately from the background and antialiasing fringe.
Uncertain overlap retains competing assertions. It is not forced into the highlight class.