summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 19:24:09 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 19:24:09 +0200
commit8eec0033dee816bfcc102fc4f511c8bfe08c14ee (patch)
tree5b247c4de81a055effaf6eb0683787141abbec16
parent161a971d065b3254a2f11cb374d2c94c2d67646b (diff)
downloadiced-8eec0033dee816bfcc102fc4f511c8bfe08c14ee.tar.gz
iced-8eec0033dee816bfcc102fc4f511c8bfe08c14ee.tar.bz2
iced-8eec0033dee816bfcc102fc4f511c8bfe08c14ee.zip
Remove unnecessary `monospaced` flag in `Font`
-rw-r--r--core/src/font.rs4
-rw-r--r--examples/editor/src/main.rs5
2 files changed, 1 insertions, 8 deletions
diff --git a/core/src/font.rs b/core/src/font.rs
index 7f647847..2b68decf 100644
--- a/core/src/font.rs
+++ b/core/src/font.rs
@@ -12,8 +12,6 @@ pub struct Font {
pub stretch: Stretch,
/// The [`Style`] of the [`Font`].
pub style: Style,
- /// Whether if the [`Font`] is monospaced or not.
- pub monospaced: bool,
}
impl Font {
@@ -23,13 +21,11 @@ impl Font {
weight: Weight::Normal,
stretch: Stretch::Normal,
style: Style::Normal,
- monospaced: false,
};
/// A monospaced font with normal [`Weight`].
pub const MONOSPACE: Font = Font {
family: Family::Monospace,
- monospaced: true,
..Self::DEFAULT
};
diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs
index 785dfb3b..5018b3cb 100644
--- a/examples/editor/src/main.rs
+++ b/examples/editor/src/main.rs
@@ -16,10 +16,7 @@ use std::sync::Arc;
pub fn main() -> iced::Result {
Editor::run(Settings {
fonts: vec![include_bytes!("../fonts/icons.ttf").as_slice().into()],
- default_font: Font {
- monospaced: true,
- ..Font::with_name("Hasklug Nerd Font Mono")
- },
+ default_font: Font::with_name("Hasklug Nerd Font Mono"),
..Settings::default()
})
}