diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-22 13:16:03 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-22 13:16:03 +0100 |
| commit | eabbbf7eae04a4a8044d83acde84d8634f095b50 (patch) | |
| tree | 74682b60a8fdff575233afb59356bfa4803749d2 /src/font | |
| parent | 85f95f75b749bb7c160ba92d9f6008031f02c882 (diff) | |
Name handling for New Computer Modern Math
Diffstat (limited to 'src/font')
| -rw-r--r-- | src/font/book.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/font/book.rs b/src/font/book.rs index dfc6140c..25b1fc85 100644 --- a/src/font/book.rs +++ b/src/font/book.rs @@ -299,7 +299,7 @@ fn decode_mac_roman(coded: &[u8]) -> String { coded.iter().copied().map(char_from_mac_roman).collect() } -/// Trim style naming from a family name. +/// Trim style naming from a family name and fix bad names. fn typographic_family(mut family: &str) -> &str { // Separators between names, modifiers and styles. const SEPARATORS: [char; 3] = [' ', '-', '_']; @@ -349,7 +349,11 @@ fn typographic_family(mut family: &str) -> &str { } } - &family[..len] + // Fix bad names. + match &family[..len] { + "NewComputerModernMath" => "New Computer Modern Math", + other => other, + } } /// How many words the two strings share in their prefix. |
