inlyne 0.5.1

Introducing Inlyne, a GPU powered yet browserless tool to help you quickly view markdown files in the blink of an eye.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use glyphon::FontSystem;

use crate::opts::FontOptions;

pub fn get_fonts(font_opts: &FontOptions) -> FontSystem {
    let mut font_system = FontSystem::new();

    if let Some(regular_name) = &font_opts.regular_font {
        font_system.db_mut().set_sans_serif_family(regular_name)
    }

    if let Some(monospace_name) = &font_opts.monospace_font {
        font_system.db_mut().set_monospace_family(monospace_name)
    }

    font_system
}