Font height is not ascent + descent. Ascent + descent = em size, but
height may be more if there is extra line spacing (height is from
baseline to baseline). Also, off by one in yof computation.
res->h = bitmap->rows;
res->dx = slot->advance.x/64;
res->xof = slot->bitmap_left;
- res->yof = slot->bitmap_top - bitmap->rows;
+ res->yof = slot->bitmap_top - bitmap->rows + 1;
f->glyphs[ch] = res;
}
res->ascent = face->size->metrics.ascender/64;
res->descent = -face->size->metrics.descender/64;
- res->height = res->ascent+res->descent; //face->size->metrics.height/64;
+ res->height = face->size->metrics.height/64;
res->sfont.antialiased = m_aafonts;
res->minchar = 32;