diff options
Diffstat (limited to 'app/gfx/canvas_linux.cc')
-rw-r--r-- | app/gfx/canvas_linux.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc index fc4e10e3..b08b4ce 100644 --- a/app/gfx/canvas_linux.cc +++ b/app/gfx/canvas_linux.cc @@ -186,11 +186,10 @@ void Canvas::DrawStringInt(const std::wstring& text, std::string utf8 = WideToUTF8(text); pango_layout_set_text(layout, utf8.data(), utf8.size()); - int width, height, chars_height; - pango_layout_get_size(layout, &width, &chars_height); + int width, height; + pango_layout_get_size(layout, &width, &height); width /= PANGO_SCALE; - // Pango returns the height of the characters, not the height of the font. - height = font.height(); + height /= PANGO_SCALE; if (flags & Canvas::TEXT_VALIGN_TOP) { // Cairo should draw from the top left corner already. |