Fixed GTK GetTextExtent bug

Added resources shell script


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@401 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-05-19 21:15:20 +00:00
parent b4c7cfb5bc
commit 9a2b992c06
3 changed files with 33 additions and 3 deletions
+6 -3
View File
@@ -235,10 +235,13 @@ double RotatedDC::getFontSizeStep() const {
}
RealSize RotatedDC::GetTextExtent(const String& text) const {
int w, h, descend;
dc.GetTextExtent(text, &w, &h, &descend);
int w, h;
dc.GetTextExtent(text, &w, &h);
#ifdef __WXGTK__
h += descend; /// wxGTK seems to think character height does not include the descender.
// HACK: Some fonts don't get the descender height set correctly.
int charHeight = dc.GetCharHeight();
if (charHeight != h)
h += h - charHeight;
#endif
if (quality == QUALITY_LOW) {
return RealSize(w,h) / zoom;