Live data from Hacker News

Commas in big numbers everywhere: An OpenType adventure

blog.janestreet.com

21–30 of 43 posts

Re: Commas in big numbers everywhere: An OpenType adventure

#21
post #6

Probably cool, but the website disables zooming in phones so I can't tell. I wish pages couldn't disable zooming -- that should be up to me. Does anyone know browsers that always allow zoomi (If any Jane Street blog folks read this, please fix your blog.)

Click on a picture. Zoom in all you want. Works just fine on my phone.

Re: Commas in big numbers everywhere: An OpenType adventure

#23
post #22

Could this be an potential avenue for some sort of exploit? I had no idea that you could "execute" logic via fonts.

Previously bugs in how iOS with how it handles certain unicode combining characters meant that an attacker could crash someone's iPhone just by sending a text. I'm not sure if it was buggy logic in the font.

https://news.ycombinator.com/item?id=16386444

Re: Commas in big numbers everywhere: An OpenType adventure

#24
post #5

Is there a way to make the font locale sensitive? Half of the planet uses dots instead of commas

Make 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."

The author made multiple variants available, including bolding, grouping via squashing, and commas. There are versions of each type published.

https://thume.ca/numderline/

Re: Commas in big numbers everywhere: An OpenType adventure

#25
post #7
post #6

Probably cool, but the website disables zooming in phones so I can't tell. I wish pages couldn't disable zooming -- that should be up to me. Does anyone know browsers that always allow zoomi (If any Jane Street blog folks read this, please fix your blog.)

Huh interesting. Zooming works fine for me on IOS. Maybe it's only blocked on Android. If I remember I'll take a look on Monday.

Second that the very first thing I did was zoom. I had no idea this was a privilege. I shall try not to take it for granted lol

Re: Commas in big numbers everywhere: An OpenType adventure

#26

Earlier quoted context omitted.

Make 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."

The author made multiple variants available, including bolding, grouping via squashing, and commas. There are versions of each type published. https://thume.ca/numderline/

If 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.

Re: Commas in big numbers everywhere: An OpenType adventure

#27

Earlier quoted context omitted.

The author made multiple variants available, including bolding, grouping via squashing, and commas. There are versions of each type published. https://thume.ca/numderline/

If 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…

A web page you visit might tell your browser to download the font (https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_t...)

Re: Commas in big numbers everywhere: An OpenType adventure

#29
AFAIK general style guides don't recommend using thousand separators in numbers below 10000, so "variable #1,234" is not quite good, it should've been simply "variable #1234". "Variable 12,345" would've probably been OK, but then there's another semantic issue: thousand separators are only used in numbers that mean quantities, not identifiers. Long numeric identifiers like phone number or SSN are usually separated differently.

Generally the issue should not be handled at the font level, it lacks sufficient context to make intelligent decisions and can never handle all possible cases. The font should just provide the required glyph variants and means to use them.

Post reply on HN