From 0a17f9ccada3c6d52a904933c01126c9189410d0 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 25 Sep 2013 13:40:54 +0200 Subject: [PATCH] Return advance as width for italic characters --- src/bitmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitmap.cpp b/src/bitmap.cpp index 65e2420..a4aac78 100644 --- a/src/bitmap.cpp +++ b/src/bitmap.cpp @@ -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); }