prehnite_core/font/
fonts.rs

1#![doc = "バンドル済みフォント"]
2macro_rules! font_mod {
3    ($mod_name:ident, $font_name:expr, $font_file_path:expr) => {
4        #[doc=$font_name]
5        pub mod $mod_name {
6            pub const NAME: &str = $font_name;
7            pub(crate) const FONT: &[u8] = include_bytes!($font_file_path);
8        }
9    };
10}
11
12font_mod!(
13    noto_sans,
14    "Noto Sans",
15    "../../../assets/fonts/Noto_Sans/NotoSans-VariableFont_wdth,wght.ttf"
16);
17
18font_mod!(
19    sawarabi_gothic,
20    "Sawarabi Gothic",
21    "../../../assets/fonts/Sawarabi_Gothic/SawarabiGothic-Regular.ttf"
22);
23
24font_mod!(
25    material_symbols_outlined,
26    "Material Symbols Outlined",
27    "../../../assets/fonts/Material_Symbols_Outlined/MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght.ttf"
28);