Override tags go in braces inside the event’s Text:
{\i1}Hello{\i0}. A tag applies to the text after it until overridden.
Several can share one pair of braces. The sources are
Aegisub’s documentation, the
SubStation Alpha specification and libass.
Line breaks and spaces
| Code | Meaning |
|---|---|
\n | Soft line break. A space unless wrap style 2. |
\N | Hard line break in any wrap mode. |
\h | Non-breaking space. |
These three are used without braces.
Text style
| Tag | Value | Meaning |
|---|---|---|
\b | 0, 1 or a weight | Bold. Weights are 100 to 900; 400 is normal and 700 bold. |
\i | 0, 1 | Italic. |
\u | 0, 1 | Underline. |
\s | 0, 1 | Strikethrough. |
\fn | Font name | No space after the tag and no quotes around the name. |
\fs | Size | Font size in script pixels. In libass, a leading + or - makes it relative, by a tenth for each unit; 0 or no value resets to the style’s size. |
\fsp | Pixels | Letter spacing, which may be negative or decimal. |
\fscx, \fscy | Percent | Horizontal or vertical scale; 100 is normal. A bare \fsc in libass resets both to the style’s values. |
\fe | Number | Overrides the font encoding. Rarely useful. |
Borders, shadows and blur
| Tag | Value | Meaning |
|---|---|---|
\bord | Width | Border width. 0 disables it. |
\xbord, \ybord | Width | Border in one axis only. |
\shad | Depth | Shadow distance. 0 disables it. |
\xshad, \yshad | Depth | Shadow offset per axis, which may be negative. |
\be | 0, 1 or strength | Blur edges. Discouraged in favour of \blur. |
\blur | Strength | Gaussian edge blur. 0 disables it. |
Rotation and shear
| Tag | Value | Meaning |
|---|---|---|
\frx, \fry, \frz | Degrees | Rotation about an axis, pivoting on \org. |
\fr | Degrees | Same as \frz. |
\fax, \fay | Factor | Shear. 0 is none; usually between −2 and 2. Applied after rotation. |
Colour and alpha
| Tag | Value | Meaning |
|---|---|---|
\c, \1c | &HBBGGRR& | Primary fill colour. |
\2c | &HBBGGRR& | Secondary colour, for text before a karaoke highlight. |
\3c | &HBBGGRR& | Border colour. |
\4c | &HBBGGRR& | Shadow colour. |
\alpha | &HAA& | Alpha for all four components. The specification’s text says plain \alpha means \1a; libass and Aegisub treat it as all four. |
\1a–\4a | &HAA& | Alpha per component: fill, secondary, border, shadow. |
Colours are blue, green, red, the reverse of HTML. Alpha 00 is opaque and
FF transparent.
Alignment and wrapping
| Tag | Value | Meaning |
|---|---|---|
\an | 1–9 | Numeric keypad position. Only the first in a line counts. |
\a | 1–11 | Legacy SSA codes. Deprecated. Bottom 1, 2, 3 (left, centre, right); add 4 for top (5, 6, 7); add 8 for middle (9, 10, 11). |
\q | 0–3 | Wrap style for the line. |
\r | Optional style name | Resets overrides to the line’s style, or to a named style. |
Karaoke
Durations are in centiseconds.
| Tag | Meaning |
|---|---|
\k | The syllable is in secondary colour until its time, then switches to primary at once. |
\K, \kf | The same timing, but the fill sweeps from secondary to primary, left to right. |
\ko | Like \k, but the border is hidden until the syllable starts. |
\kt | Sets the next syllable’s start time relative to the event start. Not fully supported. |
Position, movement and fades
Each appears at most once per line.
| Tag | Arguments | Meaning |
|---|---|---|
\pos | (x,y) | Position in script resolution, anchored according to \an. Cannot be used with \move. |
\move | (x1,y1,x2,y2) or (x1,y1,x2,y2,t1,t2) | Moves at constant speed over the whole line or between two times, in milliseconds. |
\org | (x,y) | Rotation origin. Only the first instance is used. |
\fad | (in,out) | Fade in and out, in milliseconds. Does not extend the line. |
\fade | (a1,a2,a3,t1,t2,t3,t4) | Five-part fade with alpha values 0–255 and millisecond times. |
Animation
\t animates tags over time.
| Form | Meaning |
|---|---|
\t(tags) | Across the whole line. |
\t(accel,tags) | With acceleration. |
\t(t1,t2,tags) | Between two times. |
\t(t1,t2,accel,tags) | Between two times with acceleration. |
Times are in milliseconds. accel 1 is linear; below 1 starts fast and
ends slow, above 1 starts slow and ends fast. Tags that can be animated are
\fs, \fscx, \fscy, \fsp,
\bord, \xbord, \ybord, \shad,
\xshad, \yshad, \frx, \fry,
\frz, \fr, \fax, \fay,
\be, \blur, \c, \1c–\4c,
\alpha, \1a–\4a and rectangular
\clip and \iclip.
Clipping
| Tag | Arguments | Meaning |
|---|---|---|
\clip | (x1,y1,x2,y2) | Shows only content inside the rectangle. Can be animated. |
\iclip | (x1,y1,x2,y2) | Hides content inside the rectangle. Can be animated. |
\clip, \iclip | ([scale,]drawing) | A vector clip made of the drawing commands below. Cannot be animated. |
Drawing mode
| Tag | Value | Meaning |
|---|---|---|
\p | 0 or integer ≥ 1 | Enables drawing mode, scaling coordinates by 2n−1. \p0 disables it. |
\pbo | Offset | Vertical baseline offset for a drawing; negative moves it up. |
| Command | Arguments | Meaning |
|---|---|---|
m | x y | Move the cursor and start a new shape, closing any open one. |
n | x y | Move the cursor without closing the current shape. |
l | x y | Draw a straight line. |
b | x1 y1 x2 y2 x3 y3 | Cubic Bézier curve. |
s | x1 y1 … xN yN | Cubic b-spline through at least three points. |
p | x y | Extends a b-spline to a new point. |
c | none | Closes a b-spline. |
A shape must start with m and closes itself if left open. Overlapping
shapes are combined with exclusive-or. A repeated command can omit its letter.