pub struct SSAStyle {Show 23 fields
pub name: String,
pub fontname: String,
pub fontsize: f32,
pub primary_color: Option<Color>,
pub secondary_color: Option<Color>,
pub outline_color: Option<Color>,
pub back_color: Option<Color>,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikeout: bool,
pub scale_x: f32,
pub scale_y: f32,
pub spacing: f32,
pub angle: f32,
pub border_style: u8,
pub outline: f32,
pub shadow: f32,
pub alignment: Alignment,
pub margin_l: f32,
pub margin_r: f32,
pub margin_v: f32,
pub encoding: f32,
}
Expand description
SSAStyle describes each part of the Format:
side of a .ssa
or .ass
subtitle.
Currently only supports .ass
, more precisely ScriptType: V4.00+
and [V4+ Styles]
Fields§
§name: String
Name of the style. Case-sensitive. Cannot include commas.
fontname: String
Fontname as used by Windows. Case-sensitive.
fontsize: f32
Fontsize.
primary_color: Option<Color>
The color that a subtitle will normally appear in.
secondary_color: Option<Color>
This color may be used instead of the Primary colour when a subtitle is automatically shifted to prevent an onscreen collision, to distinguish the different subtitles.
outline_color: Option<Color>
This color may be used instead of the Primary or Secondary colour when a subtitle is automatically shifted to prevent an onscreen collision, to distinguish the different subtitles.
back_color: Option<Color>
The color of the subtitle outline or shadow.
bold: bool
Defines whether text is bold or not.
italic: bool
Defines whether text is italic or not.
underline: bool
Defines whether text is underlined or not.
strikeout: bool
Defines whether text is strikeout or not.
scale_x: f32
Modifies the width of the font. Value is percentage.
scale_y: f32
Modifies the height of the font. Value is percentage.
spacing: f32
Extra space between characters (in pixels).
angle: f32
Origin of the rotation is defined by the alignment (as degrees).
border_style: u8
Border style. Allowed values are:
1
: Outline + drop shadow3
: Opaque box
outline: f32
If SSAStyle::border_style is 1
, then this specifies the width of the outline around the
text (in pixels).
Values may be 0
, 1
, 2
, 3
or 4
.
shadow: f32
If SSAStyle::border_style is 1
, then this specifies the depth of the drop shadow behind
the text (in pixels). Values may be 0
, 1
, 2
, 3
or 4
. Drop shadow is always used in
addition to an outline - SSA will force an outline of 1 pixel if no outline width is given.
alignment: Alignment
Sets how text is “justified” within the Left/Right onscreen margins, and also the vertical placing.
margin_l: f32
Defines the Left Margin in pixels.
margin_r: f32
Defines the Right Margin in pixels.
margin_v: f32
Defines the Vertical Left Margin in pixels.
encoding: f32
Specifies the font character set or encoding and on multilingual Windows installations it provides access to characters used in multiple than one language. It is usually 0 (zero) for English (Western, ANSI) Windows.