diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-06 12:41:42 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-06 12:41:42 +0100 |
| commit | 2ee5810fecb96a8d4e0d078faecc8c91096d6881 (patch) | |
| tree | 702c746a3021f5034e1b31cd07e8fadba0e4dd7a /src/style.rs | |
| parent | bd384a2a633e21cd7deff7ed2a29a9c03a63a20e (diff) | |
Asyncify font loading 🪐
Diffstat (limited to 'src/style.rs')
| -rw-r--r-- | src/style.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/style.rs b/src/style.rs index cbe4bf01..68c76ad1 100644 --- a/src/style.rs +++ b/src/style.rs @@ -58,7 +58,7 @@ impl TextStyle { } macro_rules! fallback { - (($($f:expr),*), $($c:expr => ($($cf:expr),*)),*) => ({ + (($($f:expr),*), $($c:expr => ($($cf:expr),*),)*) => ({ let mut fallback = FontFallbackTree::new(vec![$($f.to_string()),*]); $( fallback.set_class_list($c.to_string(), vec![$($cf.to_string()),*]) @@ -74,10 +74,11 @@ impl Default for TextStyle { TextStyle { fallback: fallback! { ("sans-serif"), - "serif" => ("source serif pro", "noto serif", "noto emoji"), - "sans-serif" => ("source sans pro", "noto sans", "noto emoji"), - "monospace" => ("source code pro", "noto sans mono", "noto emoji"), - "math" => ("latin modern math", "serif") + "serif" => ("source serif pro", "noto serif", "__base"), + "sans-serif" => ("source sans pro", "noto sans", "__base"), + "monospace" => ("source code pro", "noto sans mono", "__base"), + "math" => ("latin modern math", "serif", "__base"), + "__base" => ("latin modern math", "noto emoji"), }, variant: FontVariant { style: FontStyle::Normal, |
