How to measure text size? #163
Unanswered
JanDiederich
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I think you're probably just missing the glyph offsets. Take a look at the swash draw code at Line 1289 in e16b39f Specifically, you probably want something like this (untested):
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since I couldn't find one, I wrote a util function to measure text size:
But this doesn't work, neither
w
norrun_width
are big enough, at the end of the function. They get bigger as the text gets longer, but they are still smaller than the actual text. So I can't center the text.What do I do? How do I measure the actual text size?
Beta Was this translation helpful? Give feedback.
All reactions