Return advance as width for italic characters

This commit is contained in:
Jonas Kulla 2013-09-25 13:40:54 +02:00
parent 32361e513a
commit 0a17f9ccad
1 changed files with 2 additions and 2 deletions

View File

@ -722,8 +722,8 @@ IntRect Bitmap::textSize(const char *str)
int w, h;
TTF_SizeUTF8(font, str, &w, &h);
// if (strlen(str) == 1)
// TTF_GlyphMetrics(font, *str, 0, 0, 0, 0, &w);
if (p->font->getItalic() && strlen(str) == 1)
TTF_GlyphMetrics(font, *str, 0, 0, 0, 0, &w);
return IntRect(0, 0, w, h);
}