diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2022-01-30 12:31:14 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2022-01-30 12:31:14 +1100 |
commit | 54405a26ef5f0ef8994c0a0621fdb7dad7281681 (patch) | |
tree | 3ff25d3c5d59ad1f7e2de96220ac59754efa13a6 /gtk | |
parent | f5deb3c95f3f7731fc14e58a7686c75d4f9dd4f9 (diff) | |
download | scintilla-mirror-54405a26ef5f0ef8994c0a0621fdb7dad7281681.tar.gz |
Use language field instead of calling pango_context_get_language as now always
available.
Diffstat (limited to 'gtk')
-rwxr-xr-x | gtk/PlatGTK.cxx | 4 |
1 files 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); |