Don't try to do sub-pixel text placement as cairo doesn't support it. Fixes #3534.
authorCarl Hetherington <carl@carlh.net>
Sun, 14 Nov 2010 21:06:36 +0000 (21:06 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 14 Nov 2010 21:06:36 +0000 (21:06 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8033 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/utils.cc

index 876a153bf8fc12e8d8dc6e3393ec70bff5695bf1..cded38786e60a46e47d6853a67fdca31bb326ed2 100644 (file)
@@ -188,7 +188,7 @@ Gtkmm2ext::pixbuf_from_string(const string& name, Pango::FontDescription* font,
        cairo_set_font_size (cr,  font->get_size() / Pango::SCALE);
        cairo_text_extents (cr, name.c_str(), &te);
        
-       cairo_move_to (cr, 0.5, 0.5 - te.height / 2 - te.y_bearing + clip_height / 2);
+       cairo_move_to (cr, 0.5, int (0.5 - te.height / 2 - te.y_bearing + clip_height / 2));
        cairo_show_text (cr, name.c_str());
        
        convert_bgra_to_rgba(cairo_image_surface_get_data (surface), buf->get_pixels(), clip_width, clip_height);