pub struct TypeStyle {Show 28 fields
pub font_family: Option<String>,
pub font_post_script_name: Option<String>,
pub font_style: Option<String>,
pub italic: Option<bool>,
pub font_weight: Option<f64>,
pub font_size: Option<f64>,
pub text_case: Option<TextCase>,
pub text_align_horizontal: Option<TextAlignHorizontal>,
pub text_align_vertical: Option<TextAlignVertical>,
pub letter_spacing: Option<f64>,
pub fills: Option<Vec<Paint>>,
pub hyperlink: Option<Box<Hyperlink>>,
pub opentype_flags: Option<HashMap<String, f64>>,
pub semantic_weight: Option<SemanticWeight>,
pub semantic_italic: Option<SemanticItalic>,
pub paragraph_spacing: Option<f64>,
pub paragraph_indent: Option<f64>,
pub list_spacing: Option<f64>,
pub text_decoration: Option<TextDecoration>,
pub text_auto_resize: Option<TextAutoResize>,
pub text_truncation: Option<TextTruncation>,
pub max_lines: Option<f64>,
pub line_height_px: Option<f64>,
pub line_height_percent: Option<f64>,
pub line_height_percent_font_size: Option<f64>,
pub line_height_unit: Option<LineHeightUnit>,
pub is_override_over_text_style: Option<bool>,
pub bound_variables: Option<Box<TypeStyleAllOfBoundVariables>>,
}
Fields§
§font_family: Option<String>
Font family of text (standard name).
font_post_script_name: Option<String>
PostScript font name.
font_style: Option<String>
Describes visual weight or emphasis, such as Bold or Italic.
italic: Option<bool>
Whether or not text is italicized.
font_weight: Option<f64>
Numeric font weight.
font_size: Option<f64>
Font size in px.
text_case: Option<TextCase>
Text casing applied to the node, default is the original casing.
text_align_horizontal: Option<TextAlignHorizontal>
Horizontal text alignment as string enum.
text_align_vertical: Option<TextAlignVertical>
Vertical text alignment as string enum.
letter_spacing: Option<f64>
Space between characters in px.
fills: Option<Vec<Paint>>
An array of fill paints applied to the characters.
hyperlink: Option<Box<Hyperlink>>
Link to a URL or frame.
opentype_flags: Option<HashMap<String, f64>>
A map of OpenType feature flags to 1 or 0, 1 if it is enabled and 0 if it is disabled. Note that some flags aren’t reflected here. For example, SMCP (small caps) is still represented by the textCase
field.
semantic_weight: Option<SemanticWeight>
Indicates how the font weight was overridden when there is a text style override.
semantic_italic: Option<SemanticItalic>
Indicates how the font style was overridden when there is a text style override.
paragraph_spacing: Option<f64>
Space between paragraphs in px, 0 if not present.
paragraph_indent: Option<f64>
Paragraph indentation in px, 0 if not present.
list_spacing: Option<f64>
Space between list items in px, 0 if not present.
text_decoration: Option<TextDecoration>
Text decoration applied to the node, default is none.
text_auto_resize: Option<TextAutoResize>
Dimensions along which text will auto resize, default is that the text does not auto-resize. TRUNCATE means that the text will be shortened and trailing text will be replaced with "…" if the text contents is larger than the bounds. TRUNCATE
as a return value is deprecated and will be removed in a future version. Read from textTruncation
instead.
text_truncation: Option<TextTruncation>
Whether this text node will truncate with an ellipsis when the text contents is larger than the text node.
max_lines: Option<f64>
When textTruncation: \"ENDING\"
is set, maxLines
determines how many lines a text node can grow to before it truncates.
line_height_px: Option<f64>
Line height in px.
line_height_percent: Option<f64>
Line height as a percentage of normal line height. This is deprecated; in a future version of the API only lineHeightPx and lineHeightPercentFontSize will be returned.
line_height_percent_font_size: Option<f64>
Line height as a percentage of the font size. Only returned when lineHeightPercent
(deprecated) is not 100.
line_height_unit: Option<LineHeightUnit>
The unit of the line height value specified by the user.
is_override_over_text_style: Option<bool>
Whether or not this style has overrides over a text style. The possible fields to override are semanticWeight, semanticItalic, hyperlink, and textDecoration. If this is true, then those fields are overrides if present.
bound_variables: Option<Box<TypeStyleAllOfBoundVariables>>