GNOME Bugzilla – Bug 739050
Fix some weird graphical glitches in RTL
Last modified: 2014-10-23 19:31:42 UTC
See patches.
Created attachment 289183 [details] [review] main: Don't update the PangoContext in clutter_set_font_flags clutter_set_font_flags already calls clutter_backend_set_font_options, which emits a signal which our PangoContext listens to, so this is just duplicate and unneeded code.
Created attachment 289184 [details] [review] actor: Create a PangoContext per actor For a variety of complicated reasons, ClutterText currently sets fields on the PangoContext when creating a layout. This causes ClutterText to behave somewhat erratically in certain cases, since the PangoContext is currently shared between all actors. GTK+ creates a PangoContext for every single GtkWidget, so it seems like we should do the same here. Move the private code that was previously in clutter-main.c into clutter-actor.c and clean it up a bit. This gives every actor its own PangoContext it can mutilate whenever it wants, at its heart's content.
Review of attachment 289184 [details] [review]: ::: clutter/clutter-actor.c @@ +15577,3 @@ + context = cogl_pango_font_map_create_context (font_map); + update_pango_context (clutter_get_default_backend (), context); + pango_context_set_language (context, pango_language_get_default ()); Should this be moved into update_pango_context()?
Review of attachment 289184 [details] [review]: looks good. ::: clutter/clutter-actor.c @@ +15577,3 @@ + context = cogl_pango_font_map_create_context (font_map); + update_pango_context (clutter_get_default_backend (), context); + pango_context_set_language (context, pango_language_get_default ()); GTK+ does not update the language of the context after creation, and the user could conceivably set a different language on the PangoContext and keep it around, so we'd stump upon it.
Review of attachment 289183 [details] [review]: looks good.
Attachment 289183 [details] pushed as 14d28e7 - main: Don't update the PangoContext in clutter_set_font_flags Attachment 289184 [details] pushed as 46877cc - actor: Create a PangoContext per actor