Variable font axes

Local embedded-font axis editing uses the contract below. The dated implementation roadmap records acceptance evidence and remaining release gates. This does not establish complete F08/F11/F14, arbitrary font/viewer/device equivalence or roadmap completion.

TextLayer and paragraph formats add optional fontVariationSettings: string. Omission and normal select the existing native matching defaults. Explicit requests use CSS font-variation-settings syntax: comma-separated quoted four-character printable ASCII tags and finite numeric values, for example "TEST" 50, "wght" 600. Tags are case-sensitive and cannot repeat. Functions, CSS-wide keywords, declarations, empty input and nonfinite values reject. The authored field has a 65,536-character text metadata budget; this does not limit font sources or image geometry.

Attached setters use shared layer.update, validation, effective locks and ordinary Undo. resetVariableAxes() requests normal in one command. On linked text this creates a local override; resetParagraphOverrides(['fontVariationSettings']) resumes inheritance. Setting the optional member to undefined clears its local override; REST JSON uses explicit normal or the existing override-clear command. A setting change explicitly reflows native text; unrelated appearance/placement changes preserve authored bounds.

The native path requires an embedded selected font source and browser FontFace variation-descriptor support. Requested tags and values must occur within the primary embedded font’s declared axes/ranges; unknown/out-of-range primary requests reject through shared validation. Authored fallback-family order is preserved. Other owned fallback faces follow native CSS semantics: unknown axes have no effect and values clamp to their own declared ranges. Inspector controls paginate the actual embedded axes and support precision preview/commit, cancellation through existing controls and reset. Unset controls show declared source defaults; CSS weight/stretch/style/optical matching may resolve differently until explicitly overridden.

Private native instances use the complete original selected render font, separate family aliases and immutable variation tuples. They never replace Unicode text, scale the layer, mutate another layer’s font face or serialize an internal alias into the model. The source store owns binary buffers and shares source registrations between active stores. Last-owner closure removes its variants; captures pin the instances they use. The cache retains at most 64 unpinned tuples per source, plus live captured tuples. This is a native-face allocation policy, not a font/document/import cap or a process-memory guarantee.

Independent REST remains headless and separate from the browser; metrics there remain estimated. Isolated scripts preload only the current document’s already owned fonts and privately register them before user code starts. Source bytes and host stores are not added to the public scripting API. Existing plugin grants, inert installation, revision/source validation and one-command-history boundaries remain authoritative.

Explicit settings require document schema 44, including paragraph formats/overrides and embedded masters/history. Earlier roots remain readable without injecting fields into legacy text. Project/font-resource/workspace envelopes are separate existing formats. Native project persistence retains complete font originals and authored settings.

Editable SVG emits font-variation-settings alongside the original family and optionally embedded bytes. Structural import retains authored settings without attempting native source activation; font admission and subsequent native placement/reflow are separate steps. Supported shaping/viewer fidelity remains subject to the SVG/font contracts. Remaining acceptance, all character-run/path/vertical text and broader professional/device/quality requirements stay open.

Primary sources: CSS Font Loading, FontFace descriptors, CSS Fonts, variation descriptors. These are current editor’s drafts; actual Chromium behavior is verified separately.