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: https://farm9.staticflickr.com/8584/16131613639_3665fcc9d9_o.png >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 https://farm8.staticflickr.com/7520/16131925067_2e051793d8_o.png 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
_______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
