Something similar like getStrWidth but for height #2145
Unanswered
TiMESPLiNTER
asked this question in
Q&A
Replies: 2 comments
-
Sorry for my late reply, but the answer is not that easy. First: Such a function does not exist and indeed you are the first one requesting this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1 for this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for the equivalent function to
getStrWidth
but for the height that respects descending characters as well.Let's say from a font the capital G-ascent from the baseline is 13px and the small g-ascent from the baseline is 8px and g-descent from the baseline is 2px.
getStrHeight("gG");
should return 15getStrHeight("g");
should return 10getStringHeight("G");
should return 13is there a function to achieve this? I couldn't find it in the library reference.
Beta Was this translation helpful? Give feedback.
All reactions