Typed rich-text JSON line height

forms.fill accepts optional lineHeightKind and lineHeight members on each original richTextRuns item, using the real supplied-font paragraph and physical-line layout

{
  "schemaVersion": 1,
  "type": "forms.fill",
  "fields": [{
    "name": "Input",
    "richTextRuns": [{
      "text": "First\rSecond",
      "fontSize": 10,
      "lineHeightKind": "number",
      "lineHeight": 2
    }]
  }]
}
KindValue and behaviour
legacyThe default when neither member is supplied, retaining the existing paragraph layout
normalExplicit normal layout using supplied font metrics and native line spacing
numberA non-negative unitless factor multiplied by this run's fontSize
pointsA non-negative absolute point height
percentA percentage computed immediately from this run's fontSize and stored as points
emA factor computed immediately from this run's fontSize and stored as points

A numeric lineHeight without lineHeightKind selects number; each numeric kind requires a value, whilst legacy and normal accept an absent value or zero

Values must be finite and between zero and one million; their computed point height must also remain within that bound, and unknown kind names or invalid types fail before font loading

Zero is supported and can produce overlapping baselines; actual face ascenders and descenders determine negative half-leading and the union of the paragraph strut and participating run boxes

Each JSON run is an original typed item rather than a CSS element; percent and em do not introduce inheritance between JSON run objects

The first run supplies the paragraph metric style; an empty first run can contribute a larger or differently styled parent box, and a separate prepared sequence admits its actual font without replacing the authored runs

IsParagraphStrut is not a public JSON member; generated metric-only runs count toward the cumulative operation run budget, and every loaded metric face counts toward aggregate font bytes

The callback receives actual configured family and style requests, including a parent face that paints no text; the existing path-based Windows file jobs use the same typed parser and supplied font planner

The saved V retains logical text, RV records the computed paragraph profile, and AP retains the original colour and font-size precision

Unchanged all-rich operations preserve the exact committed PDF bytes, including valid read-only semantic no-ops; changed read-only styles, AES authentication failures and protected signature fields retain the existing policies

Callback errors, cancellation and publication-budget failures preserve the previous context; file jobs also preserve the previous destination under atomic publication

A callback sink can already have accepted candidate PDF bytes when a later callback fails; the live context commits only after the required callbacks and final cancellation checks succeed

The versioned C operation and font callback layouts are unchanged; capabilities advertise the actual lineHeight kinds and bounds within the typed filling profile

Native line-height layout · Original run record