ScaledTextFieldLeft¶
src.text_layers.ScaledTextFieldLeft
¶
Bases: TextField
A TextField which automatically scales down its font size until the left bound
no longer overlaps with the reference layer's right bound.
Source code in src\text_layers.py
Attributes¶
TI: TextItem
¶
The TextItem object within the ArtLayer.
color: SolidColor
¶
A SolidColor object provided, or fallback on current TextItem color.
doc_selection: Selection
¶
The Selection object from the active document.
docref: Document
¶
The currently active Photoshop document.
font: str
¶
Font provided, or fallback on global constant.
input: str
¶
Raw contents provided to fill the TextItem.
is_text_layer: bool
¶
Checks if the layer provided is a TextLayer.
kw_color: Optional[SolidColor]
¶
Color to apply to the TextItem.
kw_font: Optional[str]
¶
Font to apply to the root TextItem.
kw_font_bold: Optional[str]
¶
Font to apply to any bold text in the TextItem.
kw_font_italic: Optional[str]
¶
Font to apply to any italicized text in the TextItem.
kw_font_mana: Optional[str]
¶
Font to apply to any mana symbols in the TextItem.
kw_symbol_map: dict[str, tuple[str, list[ColorObject]]]
¶
Symbol map to use for formatting mana symbols.
kwargs: dict
¶
Contains optional parameters to modify text formatting behavior.
layer: ArtLayer
¶
ArtLayer containing the TextItem.
reference: Optional[ArtLayer]
¶
A reference layer, typically used for scaling the TextItem.
reference_dims: Optional[type[LayerDimensions]]
¶
Optional[type[LayerDimensions]]: Dimensions of the scaling reference layer.
Functions¶
validate()
¶
Ensure the Text Layer provided is valid.