styles
CABIN_PRESET = [cabin_default, *get_complimenting_styles(cabin_default)]
module-attribute
GJM_GANDHI_PRESET = [gandhi_default, *get_complimenting_styles(gandhi_default)]
module-attribute
LATO_PRESET = [lato_default, *get_complimenting_styles(lato_default)]
module-attribute
MERRIWEATHER_PRESET = [merriweather_default, *get_complimenting_styles(merriweather_default)]
module-attribute
__all__ = ['gandhi_default', 'GJM_GANDHI_PRESET', 'cabin_default', 'CABIN_PRESET', 'lato_default', 'LATO_PRESET', 'merriweather_default', 'MERRIWEATHER_PRESET', 'edit_style', 'resize_preset', 'default_style_args', 'get_complimenting_styles']
module-attribute
cabin_default = Style(name='Default', fontname='Cabin', fontsize=85.0, outline=3.2, shadow=1.5, margin_l=180, margin_r=180, margin_v=50, **default_style_args)
module-attribute
default_style_args: dict[str, Any] = {'bold': True, 'italic': False, 'underline': False, 'strike_out': False, 'scale_x': 100.0, 'scale_y': 100.0, 'spacing': 0.0, 'angle': 0.0, 'encoding': 1, 'alignment': 2, 'border_style': 1, 'primary_color': Color(r=255, g=255, b=255, a=0), 'secondary_color': Color(r=255, g=0, b=0, a=0), 'outline_color': Color(r=0, g=0, b=0, a=0), 'back_color': Color(r=0, g=0, b=0, a=160)}
module-attribute
gandhi_default = Style(name='Default', fontname='Gandhi Sans', fontsize=75.0, outline=3.6, shadow=1.5, margin_l=180, margin_r=180, margin_v=55, **default_style_args)
module-attribute
lato_default = Style(name='Default', fontname='Lato', fontsize=75.0, outline=3.2, shadow=1.5, margin_l=180, margin_r=180, margin_v=55, **default_style_args)
module-attribute
merriweather_default = Style(name='Default', fontname='Merriweather', fontsize=78.0, outline=3.3, shadow=1.5, margin_l=180, margin_r=180, margin_v=55, **default_style_args)
module-attribute
edit_style
Copies a style to set a new name and other arguments via kwargs
Source code in muxtools/subtitle/styles.py
get_complimenting_styles
Generates colored Alt/Overlap and Flashback styles for a given style.
Source code in muxtools/subtitle/styles.py
resize_preset
Resize a list of styles to match a resolution.
This assumes the passed styles are for a 1080p script.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
preset
|
list[Style]
|
List of styles to resize |
required |
target_height
|
int | Document
|
Either a height integer or an ass document to get the height from |
360
|
Returns:
Type | Description |
---|---|
list[Style]
|
A list of deepcopied styles. This doesn't edit the input styles. |