Hi!
I'm trying to render text, using FreeType 2. My problem is in offsetting each glyph with respect to their own origin. In this mail, with "offset", I refer to what is called bearingX and bearingY in
this illustration.
I first render all glyphs, storing necessary metrics, then use the results to render text.
Given an unsigned char c, this is how I render glyphs, and need to obtain the correct offsets (C++):
FT_Face face;
if (!FT_Load_Char(face, c, 0)) {
if (!FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL)) {
if (!FT_Get_Char_Index( face, c )) continue;
// Set offset of glyphs accessing face->glyph here.