Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
zo1
· 10y ago · 0 comments
Regarding point number 2, it should be noted that this only applies for non mono-spaced fonts. If you were using a mono-spaced font, then each character glyph uses the same physical canvas width as all others.
Comments
[–]
sanxiyn
10y ago
No, you are wrong. Unicode characters can be halfwidth or fullwidth even for monospaced fonts.
[–]
zo1
OP
10y ago
Okay - I didn't know about those. I stand corrected.
[–]
luchs
10y ago
Here's an example where it's broken:
https://i.imgur.com/ugVBCJL.png
[–]
kbr
10y ago
Would it be a bit better if I go through each line and instead of getting the length, get the actual width of it?