From 81faf7caa31fd9a4942d56f2fcc443c94eb56f35 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Apr 2024 00:49:46 +0200 Subject: [PATCH 1/7] settings: Change the default of hint-font-metrics Change the default value to TRUE. This is because we want to stop hardcoding this value for unscaled situations, but we don't want to change everybody's font rendering. --- gtk/gtksettings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index e44f35d11a..d9bda5dc3c 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -507,7 +507,7 @@ gtk_settings_class_init (GtkSettingsClass *class) * Since: 4.6 */ pspecs[PROP_HINT_FONT_METRICS] = g_param_spec_boolean ("gtk-hint-font-metrics", NULL, NULL, - FALSE, + TRUE, GTK_PARAM_READWRITE); /** From 4c809281b2de6d141b590d27dd8fc2279bfec8d2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Apr 2024 00:50:08 +0200 Subject: [PATCH 2/7] widget: Stop hardcoding hint-font-metrics We used to hardcode hint-font-metrics = TRUE for unscaled rendering. Stop doing that. Users should be able to decide for themselves. --- gtk/gtkwidget.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index bad72ebd05..2536762acf 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6466,7 +6466,6 @@ gtk_widget_update_pango_context (GtkWidget *widget, cairo_font_options_t *font_options; guint old_serial; gboolean hint_font_metrics = FALSE; - int scale; old_serial = pango_context_get_serial (context); @@ -6474,17 +6473,11 @@ gtk_widget_update_pango_context (GtkWidget *widget, pango_context_set_font_description (context, font_desc); pango_font_description_free (font_desc); - scale = gtk_widget_get_scale_factor (widget); settings = gtk_widget_get_settings (widget); if (settings) { g_object_get (settings, "gtk-hint-font-metrics", &hint_font_metrics, NULL); - - /* Override the user setting on non-HiDPI */ - if (scale == 1) - hint_font_metrics = TRUE; - pango_context_set_round_glyph_positions (context, hint_font_metrics); } From bc94b4f23545fc14dd9eea5809ceb602eaa3fddb Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Apr 2024 10:06:38 +0200 Subject: [PATCH 3/7] widget: Simplify our font options handling Streamline the code that sets up pango contexts. No functional change. --- gtk/gtkwidget.c | 62 +++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 2536762acf..e63b200aee 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6463,9 +6463,7 @@ gtk_widget_update_pango_context (GtkWidget *widget, GtkCssStyle *style = gtk_css_node_get_style (priv->cssnode); PangoFontDescription *font_desc; GtkSettings *settings; - cairo_font_options_t *font_options; guint old_serial; - gboolean hint_font_metrics = FALSE; old_serial = pango_context_get_serial (context); @@ -6473,14 +6471,6 @@ gtk_widget_update_pango_context (GtkWidget *widget, pango_context_set_font_description (context, font_desc); pango_font_description_free (font_desc); - settings = gtk_widget_get_settings (widget); - - if (settings) - { - g_object_get (settings, "gtk-hint-font-metrics", &hint_font_metrics, NULL); - pango_context_set_round_glyph_positions (context, hint_font_metrics); - } - if (direction != GTK_TEXT_DIR_NONE) pango_context_set_base_dir (context, direction == GTK_TEXT_DIR_LTR ? PANGO_DIRECTION_LTR @@ -6488,36 +6478,32 @@ gtk_widget_update_pango_context (GtkWidget *widget, pango_cairo_context_set_resolution (context, _gtk_css_number_value_get (style->core->dpi, 100)); - font_options = (cairo_font_options_t*)g_object_get_qdata (G_OBJECT (widget), quark_font_options); - if (settings && font_options) - { - cairo_font_options_t *options; - - options = cairo_font_options_copy (gtk_settings_get_font_options (settings)); - cairo_font_options_merge (options, font_options); - - cairo_font_options_set_hint_metrics (options, - hint_font_metrics == 1 ? CAIRO_HINT_METRICS_ON - : CAIRO_HINT_METRICS_OFF); - - pango_cairo_context_set_font_options (context, options); - cairo_font_options_destroy (options); - } - else if (settings) - { - cairo_font_options_t *options; - - options = cairo_font_options_copy (gtk_settings_get_font_options (settings)); - cairo_font_options_set_hint_metrics (options, - hint_font_metrics == 1 ? CAIRO_HINT_METRICS_ON - : CAIRO_HINT_METRICS_OFF); - - pango_cairo_context_set_font_options (context, options); - cairo_font_options_destroy (options); - } - pango_context_set_font_map (context, gtk_widget_get_effective_font_map (widget)); + settings = gtk_widget_get_settings (widget); + + if (settings) + { + gboolean hint_font_metrics; + cairo_font_options_t *font_options, *options; + + g_object_get (settings, "gtk-hint-font-metrics", &hint_font_metrics, NULL); + + options = cairo_font_options_copy (gtk_settings_get_font_options (settings)); + font_options = (cairo_font_options_t*)g_object_get_qdata (G_OBJECT (widget), quark_font_options); + if (font_options) + cairo_font_options_merge (options, font_options); + + cairo_font_options_set_hint_metrics (options, + hint_font_metrics == 1 ? CAIRO_HINT_METRICS_ON + : CAIRO_HINT_METRICS_OFF); + + pango_context_set_round_glyph_positions (context, hint_font_metrics); + pango_cairo_context_set_font_options (context, options); + + cairo_font_options_destroy (options); + } + return old_serial != pango_context_get_serial (context); } From 558db5a3a794b543d190d65bd0bd68a07d6eb0c6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 19 Apr 2024 12:54:19 -0400 Subject: [PATCH 4/7] settings: Allow enums as settings We can easily handle this, and it makes such settings appear more natural, e.g. in the inspector. --- gdk/wayland/gdkdisplay-wayland.c | 5 +++++ gtk/gtksettings.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 46af453bd3..c7990ec178 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -2201,6 +2201,11 @@ set_value_from_entry (GdkDisplay *display, ? g_settings_get_boolean (settings, entry->key) : entry->fallback.b); break; + case G_TYPE_ENUM: + g_value_set_enum (value, settings && entry->valid + ? g_settings_get_enum (settings, entry->key) + : entry->fallback.i); + break; case G_TYPE_NONE: if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp")) g_value_set_uint (value, (guint)entry->fallback.i); diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index d9bda5dc3c..8b4522bee2 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1773,7 +1773,6 @@ settings_update_xsetting (GtkSettings *settings, gboolean force) { GType value_type; - GType fundamental_type; gboolean retval = FALSE; if (settings->property_values[pspec->param_id - 1].source == GTK_SETTINGS_SOURCE_APPLICATION) @@ -1783,10 +1782,8 @@ settings_update_xsetting (GtkSettings *settings, return FALSE; value_type = G_PARAM_SPEC_VALUE_TYPE (pspec); - fundamental_type = G_TYPE_FUNDAMENTAL (value_type); - if ((g_value_type_transformable (G_TYPE_INT, value_type) && - !(fundamental_type == G_TYPE_ENUM || fundamental_type == G_TYPE_FLAGS)) || + if (g_value_type_transformable (G_TYPE_INT, value_type) || g_value_type_transformable (G_TYPE_STRING, value_type) || g_value_type_transformable (GDK_TYPE_RGBA, value_type)) { From 5f7cab4632c93acb3c7c818b5c69e92d657fe8de Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Apr 2024 10:54:29 +0200 Subject: [PATCH 5/7] Add a new font rendering setting Add a high-level setting that gives us more freedom to tweak font rendering knobs according to our needs. It has a 'manual' value that lets users continue to influence font rendering using the low-level font-related settings as before. Once the schemas have this, we can support setting this session-wide. See https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/79 The initial implementation of 'automatic' font rendering is fairly simplistic: if the monitor dpi is less than 200, prefer sharpness, so turn on metrics hinting and slight hinting. If the monitor dpi is at least 200, we both off. --- gdk/wayland/gdkdisplay-wayland.c | 1 + gtk/gtkenums.h | 25 +++++++++++++++++ gtk/gtksettings.c | 16 +++++++++++ gtk/gtkwidget.c | 47 ++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index c7990ec178..7cff83ce22 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1811,6 +1811,7 @@ static TranslationEntry translations[] = { { FALSE, "org.gnome.desktop.interface", "font-hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 1 } }, { FALSE, "org.gnome.desktop.interface", "font-hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 1 } }, { FALSE, "org.gnome.desktop.interface", "font-rgba-order", "gtk-xft-rgba", G_TYPE_NONE, { .i = 0 } }, + { FALSE, "org.gnome.desktop.interface", "font-rendering", "gtk-font-rendering", G_TYPE_ENUM, { .i = 0 } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 1 } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 1 } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 1 } }, diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index c8e7713e44..584c296f15 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -1852,4 +1852,29 @@ typedef enum { /*< prefix=GTK_POPOVER_MENU >*/ GTK_POPOVER_MENU_NESTED = 1 << 0 } GtkPopoverMenuFlags; +/** + * GtkFontRendering: + * @GTK_FONT_RENDERING_AUTOMATIC: Set up font rendering automatically, + * taking factors like screen resolution and scale into account + * @GTK_FONT_RENDERING_MANUAL: Follow low-level font-related settings + * when configuring font rendering + * + * Values for the [property@Gtk.Settings:gtk-font-rendering] setting + * that influence how GTK renders fonts. + * + * The @GTK_FONT_RENDERING_AUTOMATIC value allows GTK to disregard the + * low-level font-related settings: + * [property@Gtk.Settings:gtk-hint-font-metrics], + * [property@Gtk.Settings:gtk-xft-antialias], + * [property@Gtk.Settings:gtk-xft-hinting], + * [property@Gtk.Settings:gtk-xft-hintstyle] and + * [property@Gtk.Settings:gtk-xft-rgba]. + * + * Since: 4.16 + */ +typedef enum { + GTK_FONT_RENDERING_AUTOMATIC, + GTK_FONT_RENDERING_MANUAL, +} GtkFontRendering; + G_END_DECLS diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 8b4522bee2..742ba182f8 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -202,6 +202,7 @@ enum { PROP_LONG_PRESS_TIME, PROP_KEYNAV_USE_CARET, PROP_OVERLAY_SCROLLING, + PROP_FONT_RENDERING, NUM_PROPERTIES }; @@ -955,6 +956,18 @@ gtk_settings_class_init (GtkSettingsClass *class) TRUE, GTK_PARAM_READWRITE); + /** + * GtkSettings:gtk-font-rendering: + * + * How GTK font rendering is set up. + * + * Since: 4.16 + */ + pspecs[PROP_FONT_RENDERING] = g_param_spec_enum ("gtk-font-rendering", NULL, NULL, + GTK_TYPE_FONT_RENDERING, + GTK_FONT_RENDERING_AUTOMATIC, + GTK_PARAM_READWRITE); + g_object_class_install_properties (gobject_class, NUM_PROPERTIES, pspecs); } @@ -1260,6 +1273,9 @@ gtk_settings_notify (GObject *object, if (settings_update_fontconfig (settings)) gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_FONT_CONFIG); break; + case PROP_FONT_RENDERING: + gtk_system_setting_changed (settings->display, GTK_SYSTEM_SETTING_FONT_CONFIG); + break; case PROP_ENABLE_ANIMATIONS: settings_invalidate_style (settings); break; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index e63b200aee..0e7f578b6d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -74,6 +74,7 @@ #include "gdk/gdkeventsprivate.h" #include "gdk/gdkprofilerprivate.h" +#include "gdk/gdkmonitorprivate.h" #include "gsk/gskdebugprivate.h" #include "gsk/gskrendererprivate.h" @@ -6464,6 +6465,7 @@ gtk_widget_update_pango_context (GtkWidget *widget, PangoFontDescription *font_desc; GtkSettings *settings; guint old_serial; + GtkFontRendering font_rendering; old_serial = pango_context_get_serial (context); @@ -6483,6 +6485,11 @@ gtk_widget_update_pango_context (GtkWidget *widget, settings = gtk_widget_get_settings (widget); if (settings) + g_object_get (settings, "gtk-font-rendering", &font_rendering, NULL); + else + font_rendering = GTK_FONT_RENDERING_AUTOMATIC; + + if (font_rendering == GTK_FONT_RENDERING_MANUAL) { gboolean hint_font_metrics; cairo_font_options_t *font_options, *options; @@ -6501,6 +6508,46 @@ gtk_widget_update_pango_context (GtkWidget *widget, pango_context_set_round_glyph_positions (context, hint_font_metrics); pango_cairo_context_set_font_options (context, options); + cairo_font_options_destroy (options); + } + else + { + cairo_font_options_t *options; + double dpi = 96.; + GdkSurface *surface; + + surface = gtk_widget_get_surface (widget); + if (surface) + { + GdkDisplay *display; + GdkMonitor *monitor; + + display = gdk_surface_get_display (surface); + monitor = gdk_display_get_monitor_at_surface (display, surface); + if (monitor) + dpi = gdk_monitor_get_dpi (monitor); + } + + options = cairo_font_options_create (); + + cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_GRAY); + + if (dpi < 200.) + { + /* Not high-dpi. Prefer sharpness by enabling hinting */ + cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_ON); + cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_SLIGHT); + } + else + { + /* High-dpi. Prefer precise positioning */ + cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF); + cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); + } + + pango_context_set_round_glyph_positions (context, FALSE); + pango_cairo_context_set_font_options (context, options); + cairo_font_options_destroy (options); } From 6c5a106d7ef02943d35719d421549719172daa3f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 6 Apr 2024 16:20:08 +0200 Subject: [PATCH 6/7] inspector: Show the font rendering setting Replace the font options with the new font rendering setting. The font options are still available for tweaking in the inspector as properties of the GtkSettings object. --- gtk/inspector/visual.c | 144 ++++++---------------------------------- gtk/inspector/visual.ui | 70 +++---------------- 2 files changed, 28 insertions(+), 186 deletions(-) diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c index 1c06f7ce46..a31a59d21b 100644 --- a/gtk/inspector/visual.c +++ b/gtk/inspector/visual.c @@ -81,9 +81,7 @@ struct _GtkInspectorVisual GtkWidget *cursor_size_spin; GtkWidget *direction_combo; GtkWidget *font_button; - GtkWidget *font_aa_switch; - GtkWidget *font_hinting_combo; - GtkWidget *metrics_hinting_switch; + GtkWidget *font_rendering_combo; GtkWidget *animation_switch; GtkWidget *font_scale_entry; GtkAdjustment *font_scale_adjustment; @@ -237,108 +235,24 @@ font_scale_adjustment_changed (GtkAdjustment *adjustment, update_font_scale (vis, factor, FALSE, TRUE, TRUE); } -static gboolean -get_font_aa (GtkInspectorVisual *vis) +static GtkFontRendering +get_font_rendering (GtkInspectorVisual *vis) { - int aa; + GtkFontRendering font_rendering; - g_object_get (vis->settings, "gtk-xft-antialias", &aa, NULL); + g_object_get (vis->settings, "gtk-font-rendering", &font_rendering, NULL); - return aa != 0; -} - -static gboolean -get_metrics_hinting (GtkInspectorVisual *vis) -{ - gboolean hinting; - - g_object_get (vis->settings, "gtk-hint-font-metrics", &hinting, NULL); - - return hinting; -} - -static unsigned int -get_font_hinting (GtkInspectorVisual *vis) -{ - int hinting; - char *hint_style_str; - unsigned int hint_style; - - g_object_get (vis->settings, - "gtk-xft-hinting", &hinting, - "gtk-xft-hintstyle", &hint_style_str, - NULL); - - hint_style = 1; - if (hinting == 0) - { - hint_style = 0; - } - else - { - if (strcmp (hint_style_str, "hintnone") == 0) - hint_style = 0; - else if (strcmp (hint_style_str, "hintslight") == 0) - hint_style = 1; - else if (strcmp (hint_style_str, "hintmedium") == 0) - hint_style = 2; - else if (strcmp (hint_style_str, "hintfull") == 0) - hint_style = 3; - } - - g_free (hint_style_str); - - return hint_style; + return font_rendering; } static void -update_font_hinting (GtkInspectorVisual *vis, - unsigned int hint_style) +update_font_rendering (GtkInspectorVisual *vis, + GtkFontRendering font_rendering) { - const char *styles[] = { "hintnone", "hintslight", "hintmedium", "hintfull" }; - int hinting; - const char *style; + if (get_font_rendering (vis) == font_rendering) + return; - g_object_get (vis->settings, - "gtk-xft-hinting", &hinting, - "gtk-xft-hintstyle", &style, - NULL); - - if (hinting != (hint_style != 0) || strcmp (style, styles[hint_style]) != 0) - g_object_set (vis->settings, - "gtk-xft-hinting", hint_style != 0, - "gtk-xft-hintstyle", styles[hint_style], - NULL); -} - -static void -font_aa_activate (GtkSwitch *sw, - GParamSpec *pspec, - GtkInspectorVisual *vis) -{ - int val, new_val; - - g_object_get (vis->settings, "gtk-xft-antialias", &val, NULL); - - new_val = gtk_switch_get_active (sw) ? 1 : 0; - - if (val != new_val) - g_object_set (vis->settings, "gtk-xft-antialias", new_val, NULL); -} - -static void -metrics_hinting_activate (GtkSwitch *sw, - GParamSpec *pspec, - GtkInspectorVisual *vis) -{ - gboolean val, new_val; - - g_object_get (vis->settings, "gtk-hint-font-metrics", &val, NULL); - - new_val = gtk_switch_get_active (sw); - - if (val != new_val) - g_object_set (vis->settings, "gtk-hint-font-metrics", new_val, NULL); + g_object_set (vis->settings, "gtk-font-rendering", font_rendering, NULL); } static void @@ -1026,29 +940,17 @@ init_font_scale (GtkInspectorVisual *vis) } static void -init_font_aa (GtkInspectorVisual *vis) +font_rendering_changed (GtkDropDown *combo, + GParamSpec *pspec, + GtkInspectorVisual *vis) { - gtk_switch_set_active (GTK_SWITCH (vis->font_aa_switch), get_font_aa (vis)); + update_font_rendering (vis, gtk_drop_down_get_selected (combo)); } static void -font_hinting_changed (GtkDropDown *combo, - GParamSpec *pspec, - GtkInspectorVisual *vis) +init_font_rendering (GtkInspectorVisual *vis) { - update_font_hinting (vis, gtk_drop_down_get_selected (combo)); -} - -static void -init_font_hinting (GtkInspectorVisual *vis) -{ - gtk_drop_down_set_selected (GTK_DROP_DOWN (vis->font_hinting_combo), get_font_hinting (vis)); -} - -static void -init_metrics_hinting (GtkInspectorVisual *vis) -{ - gtk_switch_set_active (GTK_SWITCH (vis->metrics_hinting_switch), get_metrics_hinting (vis)); + gtk_drop_down_set_selected (GTK_DROP_DOWN (vis->font_rendering_combo), get_font_rendering (vis)); } static void @@ -1299,9 +1201,7 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass) gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, slowdown_adjustment); gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, slowdown_entry); gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, visual_box); - gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_aa_switch); - gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_hinting_combo); - gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, metrics_hinting_switch); + gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_rendering_combo); gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, debug_box); gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_button); gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_scale_entry); @@ -1319,9 +1219,7 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass) gtk_widget_class_bind_template_callback (widget_class, updates_activate); gtk_widget_class_bind_template_callback (widget_class, cairo_activate); gtk_widget_class_bind_template_callback (widget_class, direction_changed); - gtk_widget_class_bind_template_callback (widget_class, font_aa_activate); - gtk_widget_class_bind_template_callback (widget_class, font_hinting_changed); - gtk_widget_class_bind_template_callback (widget_class, metrics_hinting_activate); + gtk_widget_class_bind_template_callback (widget_class, font_rendering_changed); gtk_widget_class_bind_template_callback (widget_class, baselines_activate); gtk_widget_class_bind_template_callback (widget_class, layout_activate); gtk_widget_class_bind_template_callback (widget_class, focus_activate); @@ -1347,9 +1245,7 @@ gtk_inspector_visual_set_display (GtkInspectorVisual *vis, init_cursor_size (vis); init_font (vis); init_font_scale (vis); - init_font_aa (vis); - init_font_hinting (vis); - init_metrics_hinting (vis); + init_font_rendering (vis); init_animation (vis); init_slowdown (vis); init_gl (vis); diff --git a/gtk/inspector/visual.ui b/gtk/inspector/visual.ui index 3282349bc4..49d14886f1 100644 --- a/gtk/inspector/visual.ui +++ b/gtk/inspector/visual.ui @@ -358,51 +358,24 @@ 40 - - Antialiasing + + Rendering start baseline 0.0 - - end - center - 1 - - - - - - - - - - - - 40 - - - Hinting - start - baseline - 0.0 - - - - + end baseline-center 1 - + - None - Slight - Medium - Full + Automatic + Manual @@ -412,31 +385,6 @@ - - - - - 40 - - - Metrics Hinting - start - baseline - 0.0 - - - - - end - center - 1 - - - - - - - @@ -787,9 +735,7 @@ - - - + @@ -813,7 +759,7 @@ - + From 8f0b38b462e4622e09efe78940fe22fbeb0e4a95 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 7 Apr 2024 02:21:32 +0200 Subject: [PATCH 7/7] tests: Update for the new setting One of our tests counts our settings. Not super-useful, but lets keep it working. --- testsuite/tools/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tools/settings b/testsuite/tools/settings index 8a31757ff2..19c78cf7c0 100755 --- a/testsuite/tools/settings +++ b/testsuite/tools/settings @@ -10,7 +10,7 @@ echo "1..1" name=gtk-query-settings result=$TEST_RESULT_DIR/$name.out $GTK_QUERY_SETTINGS 2>/dev/null >$result -EXPECTED=51 +EXPECTED=52 SEEN=$(wc -l $result | cut -f1 -d' ') if [ $SEEN -eq $EXPECTED ]; then