Hi!
I'm having a sort of conceptual problem: text that is right-aligned by
my layout algorithm is overshooting the right boundary when rendered.
This is bad because the last glyph in the line ends up getting visibly
truncated there. All glyph dimensions used by this algorithm are
provided by Freetype.
This problem seems to occur because of two conditions that are met:
1. using the advance of the last glyph in the line to compute the total
line length and therefore implicitly the space between the
second-to-last character and the right edge.
2. an italic font where the top parts of most glyphs reach further than
the advance
So how would I find out the actual width of the character so that
right-aligning it will never lead to truncation of the glyph?
My guess is that I need some sort of bounding box, but for some reason I
cannot make FT_Glyph_Get_CBox return a non-zero bounding box. Is there
some other way how I can obtain a control box or bounding box for a
TrueType font at the current font size? Or do I need to use a different
measure anyway?
Regards,
Gregor
_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype