Open flipswitchingmonkey opened 5 years ago
I could see this being a good case for an alternate character — accessed with something like font-feature-settings: "zero"
Worth noting: Public Sans is a text/UI font, not a monospace or coding font. Most text/display typefaces don’t have slashed or dotted zeros.
Generally if you have ID numbers or other contexts where 0/O differentiation is important, you would use a different typeface for those elements.
The US Web Design System, of which Public Sans is a part, currently specifies Roboto Mono (which does have a slashed zero) for this purpose. See https://v2.designsystem.digital.gov/components/typography/
Inter is a very popular sans-serif font that provides alternate character for slashed-zero.
Out of the dozen extra features offered by Inter, the optional slashed-zero is the only one that makes me regularly recommend Inter over Public Sans.
It's convenient and useful to differentiate between zero and capital O without having to switch to a monospaced font.
It'd be nice if the zero character could differ more from the O character:
Ideally the numeric zero would be slashed or dotted, so as to clearly differ from the letter O.
See e.g. https://github.com/tonsky/FiraCode for an example.