public class SubtitlesStyle : NSObject
The subtitles settings to customize subtitles rendering.
public class SubtitlesStyle : NSObject
The subtitles settings to customize subtitles rendering.
Whether this object was initialized from system settings and not modified afterwards.
If you serialize a style that has systemSettings = true
and deserialize it later, you will
still get a style with systemSettings = true
, that will reflect the system settings at the
time of deserialization (which might be different from the ones at the time of original
initialization).
Swift
public let systemSettings: Bool
The font size scaling.
This is a number holding a percentage of the size of the calculated default font size.
A value of 1.2
indicates 20% larger than the default font size.
A value of 0.8
indicates 80% of the default font size.
The value 1.0
indicates no size difference and is the default.
Swift
public var fontSizeScale: Float
The primary typeface used for text. Default is MACaptionAppearanceFontStyle.default
MACaptionAppearanceFontStyle.default
will use the font family specified in the subtitle
content. Any other value will override the font family with an unspecified font which has
matching typeface properties. This setting has no effect if fontFamilyName
is explicitly
set.
Swift
public var typeface: MACaptionAppearanceFontStyle
Explicitly specifies which font to use for all subtitles. Default is nil
.
If non-null, explicitly overrides the font family to use If set to null then the typeface property is used instead. If using this setting, you must ensure the font is already installed and available in the system.
Note
This should contain a UTF-8 encoded string.Swift
public var fontFamilyName: String?
Enable auto flow.
If true, will ignore all subtitle positioning and text flow defined in the content, and simply fit all text together at the bottom-middle of the screen. This is useful especially when you adjust the font size scaling
Swift
public var autoFlowEnabled: Bool
Enable ignore span background color
This is usefull especially when background color is defined in region and also in nested elements (span).
Swift
public var ignoreSpanBackgroundColor: Bool
The text foreground color.
This also contains the alpha/opacity component of the color.
Swift
public var foregroundColor: UIColor?
The text background color. This also contains the alpha/opacity component of the color.
Swift
public var backgroundColor: UIColor?
The window color. This also contains the alpha/opacity component of the color.
Swift
public var windowColor: UIColor?
The edge color. This also contains the alpha/opacity component of the color.
Swift
public var edgeColor: UIColor?
The edge type. Default is undefined
.
Swift
public var edgeType: MACaptionAppearanceTextEdgeStyle
Forceably render all subtitle text with a bold style.
Swift
public var forceBoldFont: Bool
Forceably render all subtitle text with an italic style.
Swift
public var forceItalicFont: Bool