1pub use iced::Font;
7use iced_core::font::Weight;
8
9use crate::cosmic_theme::FontConfig;
10
11#[inline]
13pub fn default() -> Font {
14 let theme = crate::theme::active();
15 Font::from(&theme.cosmic().font)
16}
17
18#[inline]
19pub fn light() -> Font {
20 Font {
21 weight: Weight::Light,
22 ..default()
23 }
24}
25
26#[inline]
27pub fn semibold() -> Font {
28 Font {
29 weight: Weight::Semibold,
30 ..default()
31 }
32}
33
34#[inline]
35pub fn bold() -> Font {
36 Font {
37 weight: Weight::Bold,
38 ..default()
39 }
40}
41
42#[inline]
44pub fn mono() -> Font {
45 let theme = crate::theme::active();
46 Font::from(&theme.cosmic().mono_font)
47}
48
49#[must_use]
51pub fn from_config(font: &FontConfig) -> Font {
52 Font::from(font)
53}