4 ms·
Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right
by legulere 11y ago
Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right and the last one to the left to simulate a narrow space as thousands separator.
- duskwuff 11y agoI suspect that it's possible, but would require an impractical number (1000) of ligatures in the font.
- samwillis 11y agoI wander if it would correctly draw: 1 000 000 and not do: 100 000 0 assuming its parsed left to right?
- tonsky 11y agoIt’s possible with classes https://medium.com/@larsenwork/class-based-contextual-positioning-in-monospaced-fonts-cb6b8b9ffe6f#.bmuw3a4xt https://medium.com/@larsenwork/class-based-contextual-positi... And assume we only support 4-10 digit numbers, it would require e.g. 6 rules or so. But substitutions are done left-to-right, that might be a problem
- CamperBob2 11y agoIt's a shame the C/C++ standards committee(s) didn't just copy Verilog's base-n notation when they added the "0b" prefix. It's nice to be able to write large constants with optional underscores every four or eight digits, e.g. 32'hffff_0867_5309_beef, or 12'b1101_1110_1010.
- Someone 11y agoYou can write 1'000'000 for a million in C++14. http://en.cppreference.com/w/cpp/language/integer_literal http://en.cppreference.com/w/cpp/language/integer_literal. They didn't use underscores because _100_000 is a valid identifier in C/C++. Arbitrary bases aren't there.
- CamperBob2 11y agoNeat, I didn't know they'd done something similar with single quotes. (No law said they had to allow constants to start with an underscore, of course...)