[vte] fonts: gtk4: Create a new pango context
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] fonts: gtk4: Create a new pango context
- Date: Wed, 20 Apr 2022 18:27:13 +0000 (UTC)
commit 1398ac862fb10b3cb7cdfc8267be2df5d5f39eb5
Author: Christian Persch <chpe src gnome org>
Date: Wed Apr 20 20:26:06 2022 +0200
fonts: gtk4: Create a new pango context
Don't use the widget's pango context, since it may contain weird font
description and attributes.
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2558
src/fonts-pangocairo.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/fonts-pangocairo.cc b/src/fonts-pangocairo.cc
index 08da26db..8d0cb2a3 100644
--- a/src/fonts-pangocairo.cc
+++ b/src/fonts-pangocairo.cc
@@ -414,13 +414,11 @@ FontInfo::create_for_widget(GtkWidget* widget,
auto screen = gtk_widget_get_screen(widget);
return create_for_screen(screen, desc, nullptr);
#elif VTE_GTK == 4
- auto context = gtk_widget_get_pango_context(widget);
-
auto display = gtk_widget_get_display(widget);
auto settings = gtk_settings_get_for_display(display);
auto fontconfig_timestamp = guint{};
g_object_get (settings, "gtk-fontconfig-timestamp", &fontconfig_timestamp, nullptr);
- return create_for_context(vte::glib::make_ref(context),
+ return create_for_context(vte::glib::take_ref(gtk_widget_create_pango_context(widget)),
desc, nullptr, fontconfig_timestamp);
// FIXMEgtk4: this uses a per-widget context, while the gtk3 code uses a per-screen
// one. That means there may be a lot less sharing and a lot more FontInfo's around?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]