CueStyle
Visual style for a run of text.
Sizes are in the authoring resolution's pixels when CueLayout.authoredHeight is set, and in points otherwise. Colours are ARGB with a non-premultiplied alpha, which is the form every subtitle format uses.
What the built-in rasterizers actually apply
A parser fills every field it can read. The three built-in rasterizers do NOT all use every one, so this is what a consumer can rely on. Measured against the tree 2026-08-30.
| Field | Desktop | Apple | Android |
|---|---|---|---|
| primaryColor, bold, italic, underline, strikeThrough | per span | per span | per span |
| fontSizePx, relativeSize, outlineColor, outlineWidthPx | per span | per span | per span |
| fontFamily | per span | per span | per span |
| shadowColor, shadowOffsetPx | first span, whole cue | first span, whole cue | first span, whole cue |
"First span, whole cue" means a cue whose spans disagree renders with the FIRST span's value everywhere. Only the shadow works that way now: it changes the cue's bitmap SIZE, so two spans asking for different shadows would be asking for two different layouts of one cue.
The optional libass renderer is not covered by this table: it does its own ASS styling and reads the original script rather than this type.
Constructors
Properties
ARGB box behind each line of text, padded by backgroundPaddingPx. The default is fully transparent, which draws nothing and costs nothing. WebVTT authors it with its bg_ colour classes and its stylesheets, and the viewer's SubtitleStyleOverride sets it. Taken from the cue's FIRST span.
The face to use. A family this system does not have falls back to the platform default, so a script naming a font only its author had still reads.
A factor on the size the text would otherwise have, from fontSizePx or the renderer's default, as a WebVTT stylesheet's font-size: 120% gives one. 1 leaves the size alone.
The drop shadow's colour. A fully transparent one turns the shadow off, and costs nothing.
How far down and right the shadow falls. Negative reaches up and left; zero turns it off.