vertical centering of text isn't correct
Closed this issue · 1 comments
wtholliday commented
Running testTextAlign
yields:
The text is lower than it should be relative to the magenta dot which is the origin. Seems that alignOffset
is returning the wrong offset along the y-axis.
My understanding of the typographic bounds is based on this:
from here
Vertical center should be at (ascent - descent)/2. Thus offset to move it down to the x-axis would be (descent - ascent) / 2.
wtholliday commented
Actually looks the same as nanovg. Oops!