Rich Text Marks Across Styles
Typed rich text retains the original logical V and canonical RV whilst 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 colours
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 likewise uses its own font and scale
Contextual Arabic joining stays 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 that 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 provides 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 behaviour
When matching attachment coverage is absent, actual selected TrueType glyph-header bounds provide 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 whilst 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 non-breaking; logical text, original styles and following character-spacing advance stay intact
The fallback edge for a double mark tracks 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 lies outside this supplied-font contract
Font-table reads remain bounded to their actual GPOS table, honour cancellation and share a traversal budget across all supplied style fonts; invalid table offsets fail before the document field is mutated
Unhinted PDF outlines work from 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 colours, 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 very 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 keep priority over fallback placement
Selected TrueType glyph bounds · Raw canonical combining classes
Appearance builder · Native rich-text fields · Grapheme fitting across styles