diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-28 18:17:22 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-28 18:17:22 -0500 |
commit | da59c77ae271f564762abf18daa551dfdc31fee1 (patch) | |
tree | 7a698b5150db2ca63d76859b7bafc1127dfc8d4a | |
parent | 0d0bdaa02e6e38e2b1997e50a4f3411fcf70176b (diff) | |
download | gtk+-da59c77ae271f564762abf18daa551dfdc31fee1.tar.gz |
widget: Use subpixel positioning
Before turning off pangos rounding of glyph positions,
we must check if the cairo we are using is new enough
to have working subpixel positioning (the relevant
cairo commit is 52a7c79fd4ff96bb5fac175f0199819b0f8c18fc).
-rw-r--r-- | gtk/gtkwidget.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 3168091367..cddb261e47 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6305,9 +6305,11 @@ update_pango_context (GtkWidget *widget, font_desc = gtk_css_style_get_pango_font (style); pango_context_set_font_description (context, font_desc); - pango_font_description_free (font_desc); + if (cairo_version () >= CAIRO_VERSION_ENCODE (1, 17, 4)) + pango_context_set_round_glyph_positions (context, FALSE); + pango_context_set_base_dir (context, _gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR ? PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL); |