[vte] fonts: Pass nullptr for language
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] fonts: Pass nullptr for language
- Date: Wed, 20 Apr 2022 18:27:12 +0000 (UTC)
commit 820bb7ba14f996d0f93172ccd37accb48be36054
Author: Christian Persch <chpe src gnome org>
Date: Wed Apr 20 20:26:06 2022 +0200
fonts: Pass nullptr for language
No need to re-set the context's language to its current value.
src/fonts-pangocairo.cc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/fonts-pangocairo.cc b/src/fonts-pangocairo.cc
index 1a35e176..08da26db 100644
--- a/src/fonts-pangocairo.cc
+++ b/src/fonts-pangocairo.cc
@@ -410,19 +410,18 @@ FontInfo*
FontInfo::create_for_widget(GtkWidget* widget,
PangoFontDescription const* desc)
{
- auto context = gtk_widget_get_pango_context(widget);
- auto language = pango_context_get_language(context);
-
#if VTE_GTK == 3
auto screen = gtk_widget_get_screen(widget);
- return create_for_screen(screen, desc, language);
+ 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),
- desc, language, fontconfig_timestamp);
+ 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?
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]