Hi,
I'm using Freetype + Harfbuzz to create a text input field for an OpenGL application and
I'm trying to figure out what metrics I should use to calculate the height of the rectangle
you see when you select text in a text input field.
For clarity, I'm trying to calculate the height of the blue rectangle underneath the text
in this screenshot:
From the docs I would think it's the ascender and descender I need to use as they
give me max displacement above and below the baseline. Though, when I use these
I'm getting a height which is not correct. To debug this I drew the descender and ascender
(from face->ascender and face->descender) in my OpenGL application as you can see
in this image:
Red: ascender
Blue: baseline
Green: descender
Because the values of the ascender and descender don't seem to be correct
(or at least not what I would expect) I'm wondering what I'm doing wrong and if I
should use other metrics?
Thanks
roxlu