docx.formatting
paper-docx 0.2.0 API reference
Effective-format resolver — read-only, provenance-bearing.
"What formatting does this text ACTUALLY carry": document defaults →
paragraph-style inheritance chain → character style → direct formatting,
with correct toggle-property semantics. Every resolved value names the
layer it came from; what this resolver cannot resolve is declared in
EffectiveFormat.unresolved — "unresolved" is a legal answer, a wrong
guess is not.
Toggle properties (ISO 29500-1 §17.7.3: b, bCs, i, iCs, caps, smallCaps, strike, emboss, imprint, outline, shadow, vanish) XOR through the style layers: direct formatting is absolute; otherwise the effective value is the XOR of every layer (docDefaults, then the paragraph-style chain root→leaf, then the character-style chain root→leaf) that specifies TRUE — the famous nested-bold-cancels gotcha, pinned by tests. Ordinary properties take the nearest specification instead.
Declared out of scope (listed in unresolved): table-style conditional
formatting, numbering-mark properties, theme resolution, and every run or
paragraph property category this focused resolver does not compute.