diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-04-18 19:20:48 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-04-18 19:20:48 -0400 |
commit | 399553556704a9997b07e7527d1038e6393a40d8 (patch) | |
tree | 1fa5b3b7c9f9d71ab1f1936d41173e04eb422caa | |
parent | 3cfad2bfc377ba0571a0c6b4adf1e9902e9bfa8f (diff) | |
download | runes-399553556704a9997b07e7527d1038e6393a40d8.tar.gz runes-399553556704a9997b07e7527d1038e6393a40d8.zip |
use PANGO_PIXELS instead of PANGO_SCALE
-rw-r--r-- | display.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -403,10 +403,11 @@ static void runes_display_recalculate_font_metrics(RunesTerm *t) metrics = pango_context_get_metrics(context, desc, NULL); - t->fontx = pango_font_metrics_get_approximate_char_width(metrics) / PANGO_SCALE; - ascent = pango_font_metrics_get_ascent(metrics); - descent = pango_font_metrics_get_descent(metrics); - t->fonty = (ascent + descent) / PANGO_SCALE; + t->fontx = PANGO_PIXELS( + pango_font_metrics_get_approximate_char_width(metrics)); + ascent = pango_font_metrics_get_ascent(metrics); + descent = pango_font_metrics_get_descent(metrics); + t->fonty = PANGO_PIXELS(ascent + descent); pango_font_description_free(desc); if (!t->layout) { |