Lazy web, is there a way in @rustlang to calculate the number of columns a character will take up when drawn monospace? (eg CJK sometimes being 2, etc)
Found https://github.com/unicode-rs/unicode-width … but it seems to return a number that isn't the number of columns after the character is drawn.
-
-
Thanks! That's very helpful
-
Having worked in text rendering (browser), the rule of thumb is that you can never know the size of a character, only the size of a whole string (because of ligatures, kerning, etc...).
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.