Regarding the use of vertical alignment, there is a discrepancy between the vertical centering effect of the text and the expected outcome. #303
-
|
Beta Was this translation helpful? Give feedback.
Answered by
JimBobSquarePants
Oct 27, 2023
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
inernoro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alignment is always measured based upon the line-height and advance (which can collapse over each other for multiline text). This means that the line is centered vertically not the glyph itself since glyphs are aligned within the advance box.
The following code demonstrates this well. Here I am drawing an
X
using vertical alignment with two red lines as a guide.