2022-12-06 16:12:59 +01:00
|
|
|
// Copyright 2022 System76 <info@system76.com>
|
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
2023-08-15 10:51:59 +02:00
|
|
|
//! Select preferred fonts.
|
|
|
|
|
|
2022-09-30 09:35:55 -06:00
|
|
|
pub use iced::Font;
|
2024-10-16 20:36:46 -04:00
|
|
|
use iced_core::font::Weight;
|
2023-05-30 23:46:49 +02:00
|
|
|
|
2024-10-03 21:27:06 +02:00
|
|
|
pub fn default() -> Font {
|
|
|
|
|
Font::from(crate::config::interface_font())
|
|
|
|
|
}
|
2023-10-30 15:48:03 +01:00
|
|
|
|
2024-10-03 21:27:06 +02:00
|
|
|
pub fn light() -> Font {
|
|
|
|
|
Font {
|
2024-10-05 01:41:32 +02:00
|
|
|
weight: Weight::Light,
|
2024-10-03 21:27:06 +02:00
|
|
|
..default()
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 15:48:03 +01:00
|
|
|
|
2024-10-03 21:27:06 +02:00
|
|
|
pub fn semibold() -> Font {
|
|
|
|
|
Font {
|
2024-10-05 01:41:32 +02:00
|
|
|
weight: Weight::Semibold,
|
2024-10-03 21:27:06 +02:00
|
|
|
..default()
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-01 07:16:13 +02:00
|
|
|
|
2024-10-03 21:27:06 +02:00
|
|
|
pub fn bold() -> Font {
|
|
|
|
|
Font {
|
2024-10-05 01:41:32 +02:00
|
|
|
weight: Weight::Bold,
|
2024-10-03 21:27:06 +02:00
|
|
|
..default()
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-01 07:16:13 +02:00
|
|
|
|
2024-10-03 21:27:06 +02:00
|
|
|
pub fn mono() -> Font {
|
|
|
|
|
Font::from(crate::config::monospace_font())
|
2023-05-30 12:03:15 -04:00
|
|
|
}
|