Rich Text Marks Across Styles
Typed rich text retains the original logical V and canonical RV while positioning a leading combining mark against the actual preceding rendered glyph on the same physical line
The base and mark can use different supplied regular, bold, italic or bold-italic font programs, different point sizes and different colors
Positioning reads real GPOS mark-to-base, mark-to-ligature and mark-to-mark attachments, including extension positioning lookups; the base anchor uses its own font and scale, and the mark anchor uses its own font and scale
Contextual Arabic joining remains active across style boundaries, and an attached mark uses the resulting joined base glyph rather than an isolated nominal glyph
Leading marks receive independent child transforms so attaching a mark does not move following ordinary text or change the logical character-spacing advance
Rich child forms retain glyph overhangs, including negative-origin combining marks and italic outlines; the owning appearance supplies the widget clip, rotation and paragraph alignment
Attached ink contributes to fitting line extents so stacked marks can remain visible at the top of a field; an indivisible cluster taller than the widget retains its existing bounded clipping behavior
When matching attachment coverage is absent, actual selected TrueType glyph-header bounds supply a placement fallback with independent point-size scales and the native Unicode combining class
Fallback placement distinguishes above, below, attached, left/right and double marks; same-side marks stack while opposite-side marks return to the base outline, and matching GPOS anchors always take priority
Double combining marks remain attachment candidates even when their Unicode line-break class is nonbreaking; logical text, original styles and following character-spacing advance remain intact
The fallback edge for a double mark follows the actual resolved bidi level of its text item, including an opposite-direction item embedded within the paragraph
Fallback bounds describe the actual font's declared outline header; automatic reconstruction of arbitrary font families remains outside this supplied-font contract
Font-table reads remain bounded to their actual GPOS table, observe cancellation and share a traversal budget across all supplied style fonts; invalid table offsets fail before the document field is mutated
Unhinted PDF outlines use design-coordinate anchors, without device-specific pixel adjustments
Acceptance
HotPDFHeadlessRichMarkTests.pas saves and reloads actual Latin, Arabic and Hebrew mark appearances, stacked marks, a genuine Arabic ligature, mixed sizes and colors, wrapping, spacing, alignment and rotation
Verify-HeadlessRichMarks.py reads the genuine embedded font programs through fontTools, independently computes GPOS anchors, verifies source values and styles and confirms each mark contributes visible MuPDF pixels by rendering the same actual appearance with that mark omitted
HotPDFHeadlessRichMarkFallbackTests.pas and Verify-HeadlessRichMarkFallback.py check actual missing-GPOS fonts, visible saved appearances, raw combining classes, selected glyph bounds and cancellation; matching anchors are also verified to retain priority over fallback placement
Selected TrueType glyph bounds · Raw canonical combining classes
Appearance builder · Native rich-text fields · Grapheme fitting across styles