From 54405a26ef5f0ef8994c0a0621fdb7dad7281681 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Sun, 30 Jan 2022 12:31:14 +1100 Subject: Use language field instead of calling pango_context_get_language as now always available. --- gtk/PlatGTK.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 483aa9bef..2f9598095 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1128,7 +1128,7 @@ XYPOSITION SurfaceImpl::Ascent(const Font *font_) { XYPOSITION ascent = 0; if (PFont(font_)->pfd) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, - PFont(font_)->pfd, pango_context_get_language(pcontext)); + PFont(font_)->pfd, language); ascent = std::ceil(pango_units_to_double( pango_font_metrics_get_ascent(metrics))); pango_font_metrics_unref(metrics); @@ -1142,7 +1142,7 @@ XYPOSITION SurfaceImpl::Ascent(const Font *font_) { XYPOSITION SurfaceImpl::Descent(const Font *font_) { if (PFont(font_)->pfd) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, - PFont(font_)->pfd, pango_context_get_language(pcontext)); + PFont(font_)->pfd, language); const XYPOSITION descent = std::ceil(pango_units_to_double( pango_font_metrics_get_descent(metrics))); pango_font_metrics_unref(metrics); -- cgit v1.2.3