diff --git a/cheese-effects-i18n.patch b/cheese-effects-i18n.patch new file mode 100644 index 0000000..0fe11b4 --- /dev/null +++ b/cheese-effects-i18n.patch @@ -0,0 +1,35 @@ +diff --git a/src/cheese-effect-chooser.c b/src/cheese-effect-chooser.c +index 8716117..61aeacb 100644 +--- a/src/cheese-effect-chooser.c ++++ b/src/cheese-effect-chooser.c +@@ -178,18 +178,20 @@ cheese_cairo_draw_card (cairo_t *cr, const GstEffect *card, gboolean highlight) + if (card->is_black) + cairo_set_source_rgb (cr, 1, 1, 1); + +- double x, y; +- cairo_select_font_face (cr, "Sans", +- CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); +- +- cairo_set_font_size (cr, 0.09); ++ PangoLayout *layout = pango_cairo_create_layout (cr); + gchar *name = gettext (card->name); +- cairo_text_extents (cr, name, &extents); +- x = 0.5 - (extents.width / 2 + extents.x_bearing); +- y = 0.92 - (extents.height / 2 + extents.y_bearing); +- ++ pango_layout_set_text (layout, name, -1); ++ PangoFontDescription *desc = pango_font_description_from_string ("Sans 0.09"); ++ pango_layout_set_font_description (layout, desc); ++ pango_font_description_free (desc); ++ int width, height; ++ pango_layout_get_size (layout, &width, &height); ++ double x, y; ++ x = 0.5 - ((double)width / PANGO_SCALE) / 2; ++ y = 0.92 - ((double)height / PANGO_SCALE) / 2; + cairo_move_to (cr, x, y); +- cairo_show_text (cr, name); ++ pango_cairo_show_layout (cr, layout); ++ g_object_unref (layout); + + if (highlight) + { diff --git a/cheese.spec b/cheese.spec index ebb1340..c37147f 100644 --- a/cheese.spec +++ b/cheese.spec @@ -1,6 +1,6 @@ Name: cheese Version: 2.28.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Application for taking pictures and movies from a webcam Group: Amusements/Graphics @@ -36,6 +36,8 @@ Requires(preun): GConf2 # http://bugzilla.gnome.org/show_bug.cgi?id=592663 Patch1: trash-menu.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=613287 +Patch2: cheese-effects-i18n.patch %description Cheese is a Photobooth-inspired GNOME application for taking pictures and @@ -44,6 +46,7 @@ videos from a webcam. It can also apply fancy graphical effects. %prep %setup -q %patch1 -p1 -b .trash-menu +%patch2 -p1 -b .effects-i18n %build %configure @@ -127,6 +130,9 @@ fi %{_datadir}/dbus-1/services/org.gnome.Cheese.service %changelog +* Fri Mar 19 2010 Matthias Clasen 2.28.1-2 +- Fix text rendering issues on the effects tab + * Mon Oct 19 2009 Matthias Clasen 2.28.1-1 - Update to 2.28.1