Live data from Hacker News

Commas in big numbers everywhere: An OpenType adventure

blog.janestreet.com

11–20 of 43 posts

Re: Commas in big numbers everywhere: An OpenType adventure

#11
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.

I'd start with this line:

  
(I also can't zoom, android/firefox)

Re: Commas in big numbers everywhere: An OpenType adventure

#12
post #5

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

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

Re: Commas in big numbers everywhere: An OpenType adventure

#13
Interesting article! Time to start a new crusade, I guess like I did for True Colors[1], and BiDirectional[2] text. This time for a better font shaping support. If you have ready tests it would help a lot. Personally, I am waiting for ligatures support to be merged[3] in alacritty terminal emulator.

Update: I started a list[4] of terminal emulators supporting it and not.

[1] https://github.com/termstandard/colors

[2] https://gist.github.com/XVilka/a0e49e1c65370ba11c17

[3] https://github.com/jwilm/alacritty/pull/2677

[4] https://gist.github.com/XVilka/070ed8b1c1186097cad65ef492201...

Re: Commas in big numbers everywhere: An OpenType adventure

#14
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.)

Firefox on Android has an accessibility setting named "Always enable zoom". With this feature enabled, I can zoom in on this site. With this feature disabled, I can not zoom in on this site.

Chrome on Android has a similar accessibility setting named "Force enable zoom".

Re: Commas in big numbers everywhere: An OpenType adventure

#17

Now I am really jealous, and want a hex version that introduces underscores for every group of four...

If you want it should be reasonably straightforward to modify the code to do that: https://github.com/trishume/numderline

More advanced but totally doable would be switching to that mode for hex strings after "0x" or "0X"

Re: Commas in big numbers everywhere: An OpenType adventure

#18
post #13

Interesting article! Time to start a new crusade, I guess like I did for True Colors[1], and BiDirectional[2] text. This time for a better font shaping support. If you have ready tests it would help a lot. Personally, I am waiting for ligatures support to be merged[3] in alacritty terminal emulator. Update: I started a list[4] of terminal emulators supporting it and not. [1] https://github.com/termstandard/colors [2]…

Regarding your list, I'm not sure what specifically you mean by "font shaping", but VS Code definitely supports programming ligatures:

https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions

Re: Commas in big numbers everywhere: An OpenType adventure

#19
post #13

Interesting article! Time to start a new crusade, I guess like I did for True Colors[1], and BiDirectional[2] text. This time for a better font shaping support. If you have ready tests it would help a lot. Personally, I am waiting for ligatures support to be merged[3] in alacritty terminal emulator. Update: I started a list[4] of terminal emulators supporting it and not. [1] https://github.com/termstandard/colors [2]…

Regarding your list, I'm not sure what specifically you mean by "font shaping", but VS Code definitely supports programming ligatures: https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions

Yes, I know. I will extend the list with more information soon. Thanks for the feedback!

Re: Commas in big numbers everywhere: An OpenType adventure

#20
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."

Post reply on HN