From b4c7cfb5bcaeb9f8071f2cb812ea9605b6c49ca9 Mon Sep 17 00:00:00 2001 From: twanvl Date: Sat, 19 May 2007 18:59:30 +0000 Subject: [PATCH] attempt at fixing text extent for gtk git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@400 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/util/rotation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/rotation.cpp b/src/util/rotation.cpp index 75d5fcd8..0a8af7fb 100644 --- a/src/util/rotation.cpp +++ b/src/util/rotation.cpp @@ -235,8 +235,11 @@ double RotatedDC::getFontSizeStep() const { } RealSize RotatedDC::GetTextExtent(const String& text) const { - int w, h; - dc.GetTextExtent(text, &w, &h); + int w, h, descend; + dc.GetTextExtent(text, &w, &h, &descend); + #ifdef __WXGTK__ + h += descend; /// wxGTK seems to think character height does not include the descender. + #endif if (quality == QUALITY_LOW) { return RealSize(w,h) / zoom; } else {