The [V4+ Styles] section starts with a Format: line that
names the fields, then has one Style: line per style, with values
separated by commas in that order. Field values may not contain commas. The script’s
default style is named *Default.
Fields
| Field | Values | Meaning |
|---|---|---|
Name | Text | The style’s name, case-sensitive and without commas. |
Fontname | Text | Font face, case-sensitive. Arial is used if it is not found. |
Fontsize | Number | Font size. |
PrimaryColour | Colour | Main fill colour. |
SecondaryColour | Colour | Colour before a karaoke syllable is highlighted; the specification also uses it for collision-shifted text. |
OutlineColour | Colour | Outline colour. |
BackColour | Colour | Shadow colour, or the box colour with BorderStyle 3. |
Bold | -1, 0 | −1 is on, 0 is off. |
Italic | -1, 0 | −1 is on, 0 is off. |
Underline | -1, 0 | −1 is on, 0 is off. |
StrikeOut | -1, 0 | −1 is on, 0 is off. |
ScaleX | Percent | Horizontal scale. |
ScaleY | Percent | Vertical scale. |
Spacing | Number | Extra space between characters, in pixels. |
Angle | Degrees | Rotation, which may be fractional. |
BorderStyle | 1, 3 | 1: outline and drop shadow. 3: opaque box. |
Outline | 0–4 | Outline width in pixels. The box margin when BorderStyle is 3. |
Shadow | 0–4 | Shadow depth in pixels. Outline is at least 1 when a shadow is used. |
Alignment | 1–9 | Numeric keypad position. |
MarginL | Pixels | Left margin. |
MarginR | Pixels | Right margin. |
MarginV | Pixels | Bottom margin; for top subtitles, the top margin. Ignored for mid subtitles. |
Encoding | Number | Font character set, usually 0. |
An event that names an unknown style uses *Default. Style names are
matched exactly.
Colours
A colour is written &HAABBGGRR: a hexadecimal value with alpha first,
then blue, green and red, the reverse of HTML order. Alpha 00 is opaque and
FF is transparent. The specification also lets a colour be written as a
plain decimal long integer holding the same bytes.
Alignment
Each number is a position on a numeric keypad.
| Left | Centre | Right | |
|---|---|---|---|
| Top | 7 | 8 | 9 |
| Middle | 4 | 5 | 6 |
| Bottom | 1 | 2 | 3 |
Encoding
These are the numbers of the Windows GDI character sets. The specification only says the value is usually 0.
| Value | Character set |
|---|---|
0 | ANSI |
1 | Default |
2 | Symbol |
128 | Shift-JIS |
129 | Hangul |
130 | Johab |
134 | GB2312 |
136 | Big5 |
161 | Greek |
162 | Turkish |
163 | Vietnamese |
177 | Hebrew |
178 | Arabic |
186 | Baltic |
204 | Russian |
222 | Thai |
238 | Eastern Europe |
255 | OEM |
Worked example
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,64,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,40,40,40,1