aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-18 19:20:48 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-18 19:20:48 -0400
commit399553556704a9997b07e7527d1038e6393a40d8 (patch)
tree1fa5b3b7c9f9d71ab1f1936d41173e04eb422caa
parent3cfad2bfc377ba0571a0c6b4adf1e9902e9bfa8f (diff)
downloadrunes-399553556704a9997b07e7527d1038e6393a40d8.tar.gz
runes-399553556704a9997b07e7527d1038e6393a40d8.zip
use PANGO_PIXELS instead of PANGO_SCALE
-rw-r--r--display.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/display.c b/display.c
index d8856c4..242b330 100644
--- a/display.c
+++ b/display.c
@@ -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) {