Remove unnecessary monospaced flag in Font
This commit is contained in:
parent
161a971d06
commit
8eec0033de
2 changed files with 1 additions and 8 deletions
|
|
@ -12,8 +12,6 @@ pub struct Font {
|
||||||
pub stretch: Stretch,
|
pub stretch: Stretch,
|
||||||
/// The [`Style`] of the [`Font`].
|
/// The [`Style`] of the [`Font`].
|
||||||
pub style: Style,
|
pub style: Style,
|
||||||
/// Whether if the [`Font`] is monospaced or not.
|
|
||||||
pub monospaced: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Font {
|
impl Font {
|
||||||
|
|
@ -23,13 +21,11 @@ impl Font {
|
||||||
weight: Weight::Normal,
|
weight: Weight::Normal,
|
||||||
stretch: Stretch::Normal,
|
stretch: Stretch::Normal,
|
||||||
style: Style::Normal,
|
style: Style::Normal,
|
||||||
monospaced: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A monospaced font with normal [`Weight`].
|
/// A monospaced font with normal [`Weight`].
|
||||||
pub const MONOSPACE: Font = Font {
|
pub const MONOSPACE: Font = Font {
|
||||||
family: Family::Monospace,
|
family: Family::Monospace,
|
||||||
monospaced: true,
|
|
||||||
..Self::DEFAULT
|
..Self::DEFAULT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,7 @@ use std::sync::Arc;
|
||||||
pub fn main() -> iced::Result {
|
pub fn main() -> iced::Result {
|
||||||
Editor::run(Settings {
|
Editor::run(Settings {
|
||||||
fonts: vec![include_bytes!("../fonts/icons.ttf").as_slice().into()],
|
fonts: vec![include_bytes!("../fonts/icons.ttf").as_slice().into()],
|
||||||
default_font: Font {
|
default_font: Font::with_name("Hasklug Nerd Font Mono"),
|
||||||
monospaced: true,
|
|
||||||
..Font::with_name("Hasklug Nerd Font Mono")
|
|
||||||
},
|
|
||||||
..Settings::default()
|
..Settings::default()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue