Make the style attribute available on Font
This commit is contained in:
parent
cb8b70bec3
commit
e86363837d
3 changed files with 33 additions and 2 deletions
|
|
@ -10,6 +10,8 @@ pub struct Font {
|
|||
pub weight: Weight,
|
||||
/// The [`Stretch`] of the [`Font`].
|
||||
pub stretch: Stretch,
|
||||
/// The [`Style`] of the [`Font`].
|
||||
pub style: Style,
|
||||
/// Whether if the [`Font`] is monospaced or not.
|
||||
pub monospaced: bool,
|
||||
}
|
||||
|
|
@ -20,6 +22,7 @@ impl Font {
|
|||
family: Family::SansSerif,
|
||||
weight: Weight::Normal,
|
||||
stretch: Stretch::Normal,
|
||||
style: Style::Normal,
|
||||
monospaced: false,
|
||||
};
|
||||
|
||||
|
|
@ -100,3 +103,13 @@ pub enum Stretch {
|
|||
ExtraExpanded,
|
||||
UltraExpanded,
|
||||
}
|
||||
|
||||
/// The style of some text.
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
|
||||
pub enum Style {
|
||||
#[default]
|
||||
Normal,
|
||||
Italic,
|
||||
Oblique,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue