diff options
author | Neil <nyamatongwe@gmail.com> | 2020-05-01 15:35:36 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-05-01 15:35:36 +1000 |
commit | 7db7214047672fa822ad207166df50218e9a433e (patch) | |
tree | b3b952f3da2d365f6fd9f52abe72b7fdc53243ba | |
parent | 1dd191db7b10f8fd61c48f152fa1b68086bcf4ab (diff) | |
download | scintilla-mirror-7db7214047672fa822ad207166df50218e9a433e.tar.gz |
Bug [#2173]. Tweak font measurement so underscores more likely visible.
-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 ba3493948..7857ece73 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -931,7 +931,7 @@ XYPOSITION SurfaceImpl::Ascent(Font &font_) { if (PFont(font_)->pfd) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, PFont(font_)->pfd, pango_context_get_language(pcontext)); - ascent = std::floor(floatFromPangoUnits( + ascent = std::round(floatFromPangoUnits( pango_font_metrics_get_ascent(metrics))); pango_font_metrics_unref(metrics); } @@ -947,7 +947,7 @@ XYPOSITION SurfaceImpl::Descent(Font &font_) { if (PFont(font_)->pfd) { PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, PFont(font_)->pfd, pango_context_get_language(pcontext)); - const XYPOSITION descent = std::floor(floatFromPangoUnits( + const XYPOSITION descent = std::round(floatFromPangoUnits( pango_font_metrics_get_descent(metrics))); pango_font_metrics_unref(metrics); return descent; |