3 ms·
Is there a way to make the font locale sensitive? Half of the planet uses dots instead of commas
by ufo 7y ago
Is there a way to make the font locale sensitive? Half of the planet uses dots instead of commas
- kulpreet 7y agoIn most cases, you'd want this to be handled at the OS-level by setting your locale preferences to match your region. However, this would require the app to be properly internationalized (using number formatters, etc.) to work correctly. So you bring up a neat idea. I'm not sure which OSs support it, but OpenType does have a `locale` feature, primarily for glyph variants (ex: same codepoint, but different glyph for Chinese vs. Japanese). I'm guessing it could be abused to accomplish what you want and not require an app to adopt i18n APIs.
- freddie_mercury 7y agoMake what locale sensitive? There are no commas in his font. "I realized that instead of inserting commas, I wanted to underline alternating groups of 3 digits so that the font would work in monospace contexts."
- pimlottc 7y agoThe author made multiple variants available, including bolding, grouping via squashing, and commas. There are versions of each type published. https://thume.ca/numderline/ https://thume.ca/numderline/
- freddie_mercury 7y agoIf you're downloading and installing a custom font, why do you need it to be locale-aware? Just down the variant that uses whatever your locale needs. (Or if there isn't one, fork it and change the commas to periods and the install that.) It seems like the only reason you'd need a locale-aware one is on a multi-user system where you'd expect users to have different locales and you're installing the font globally. But that doesn't really seem like a likely use-case for this pretty niche font that is almost exclusively going to installed on single-user machines by the end-user.
- Someone 7y agoA web page you visit might tell your browser to download the font (https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Web_fonts https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_t...)