Chlumsky / msdfgen

Multi-channel signed distance field generator
MIT License
3.9k stars 404 forks source link

Command line interface does not accept g0 as glyph input #148

Closed TJYSunset closed 2 years ago

TJYSunset commented 2 years ago
 PS> msdfgen msdf -font FiraSans-Bold.otf g0
No character specified! Use -font <file.ttf/otf> <character code>. Character code can be a Unicode index (65, 0x41), a character in apostrophes ('A'), or a glyph index prefixed by g (g36, g0x24).

The cause seem to be using zero as failure indicator instead of using std::optional.

Glyph #0, unlike Unicode Character 'NULL', can be a perfectly valid and even visible character. (Furthermore, in an automated asset pipeline, you will want to build every glyph regardless of visibility.)