Commit 0c454b4b authored by twanvl's avatar twanvl

attempt at fixing text extent for gtk

parent 50505411
...@@ -235,8 +235,11 @@ double RotatedDC::getFontSizeStep() const { ...@@ -235,8 +235,11 @@ double RotatedDC::getFontSizeStep() const {
} }
RealSize RotatedDC::GetTextExtent(const String& text) const { RealSize RotatedDC::GetTextExtent(const String& text) const {
int w, h; int w, h, descend;
dc.GetTextExtent(text, &w, &h); 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) { if (quality == QUALITY_LOW) {
return RealSize(w,h) / zoom; return RealSize(w,h) / zoom;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment