After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739050 - Fix some weird graphical glitches in RTL
Fix some weird graphical glitches in RTL
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-23 02:04 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-10-23 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Don't update the PangoContext in clutter_set_font_flags (1.31 KB, patch)
2014-10-23 02:04 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
actor: Create a PangoContext per actor (7.69 KB, patch)
2014-10-23 02:04 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2014-10-23 02:04:26 UTC
See patches.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-10-23 02:04:28 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-10-23 02:04:32 UTC
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.
Comment 3 Cosimo Cecchi 2014-10-23 04:16:21 UTC
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()?
Comment 4 Emmanuele Bassi (:ebassi) 2014-10-23 09:49:33 UTC
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.
Comment 5 Emmanuele Bassi (:ebassi) 2014-10-23 09:50:08 UTC
Review of attachment 289183 [details] [review]:

looks good.
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-10-23 19:31:34 UTC
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