aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2022-01-30 12:31:14 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2022-01-30 12:31:14 +1100
commit54405a26ef5f0ef8994c0a0621fdb7dad7281681 (patch)
tree3ff25d3c5d59ad1f7e2de96220ac59754efa13a6 /gtk
parentf5deb3c95f3f7731fc14e58a7686c75d4f9dd4f9 (diff)
downloadscintilla-mirror-54405a26ef5f0ef8994c0a0621fdb7dad7281681.tar.gz
Use language field instead of calling pango_context_get_language as now always
available.
Diffstat (limited to 'gtk')
-rwxr-xr-xgtk/PlatGTK.cxx4
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);