Return advance as width for italic characters
This commit is contained in:
parent
32361e513a
commit
0a17f9ccad
|
@ -722,8 +722,8 @@ IntRect Bitmap::textSize(const char *str)
|
||||||
int w, h;
|
int w, h;
|
||||||
TTF_SizeUTF8(font, str, &w, &h);
|
TTF_SizeUTF8(font, str, &w, &h);
|
||||||
|
|
||||||
// if (strlen(str) == 1)
|
if (p->font->getItalic() && strlen(str) == 1)
|
||||||
// TTF_GlyphMetrics(font, *str, 0, 0, 0, 0, &w);
|
TTF_GlyphMetrics(font, *str, 0, 0, 0, 0, &w);
|
||||||
|
|
||||||
return IntRect(0, 0, w, h);
|
return IntRect(0, 0, w, h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue