Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Commit

Permalink
Special-case the space glyph, because fontbakery
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Jul 19, 2021
1 parent 0c02ca4 commit 2a1f9c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/fonttools-cli/src/bin/ttf-rename-glyphs.rs
Expand Up @@ -9,7 +9,9 @@ fn build_production_name(name: &str, unicodes: Option<&HashSet<u32>>) -> String
return name.to_string();
}
let first: u32 = *unicodes.unwrap().iter().sorted().next().unwrap();
if first > 0xFFFF {
if first == 0x20 {
"space".to_string()
} else if first > 0xFFFF {
format!("u{:04X}", first)
} else {
format!("uni{:04X}", first)
Expand Down

0 comments on commit 2a1f9c0

Please sign in to comment.