Constant freya::elements::paragraph::font_style
pub const font_style: (&'static str, Option<&'static str>, bool);
Expand description
You can choose a style for a text using the font_style
attribute.
Accepted values:
upright
(default)italic
oblique
ยงExample
fn app() -> Element {
rsx!(
label {
font_style: "italic",
"Hello, italic World!"
}
)
}
You can also specify multiple fonts in order of priority, if one is not found it will fallback to the next one.
Example:
fn app() -> Element {
rsx!(
label {
font_family: "DoesntExist Font, Impact",
"Hello, World!"
}
)
}