aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-19 00:08:09 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-19 00:08:09 -0400
commit693cfd3e7e46fa3288677ffd962b2ead758ae2c8 (patch)
tree84d5ecf70d8eec4997237cac29fbbc7b1b590cbe
parent43db8d1e88cfb95e32f554fe3cc0004803a3fe55 (diff)
downloadrunes-693cfd3e7e46fa3288677ffd962b2ead758ae2c8.tar.gz
runes-693cfd3e7e46fa3288677ffd962b2ead758ae2c8.zip
apparently digit width is more reliable
char_width may be affected by double-width characters in some cases
-rw-r--r--display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/display.c b/display.c
index 866a5d4..fc76c8d 100644
--- a/display.c
+++ b/display.c
@@ -441,7 +441,7 @@ static void runes_display_recalculate_font_metrics(RunesTerm *t)
metrics = pango_context_get_metrics(context, desc, NULL);
t->fontx = PANGO_PIXELS(
- pango_font_metrics_get_approximate_char_width(metrics));
+ pango_font_metrics_get_approximate_digit_width(metrics));
ascent = pango_font_metrics_get_ascent(metrics);
descent = pango_font_metrics_get_descent(metrics);
t->fonty = PANGO_PIXELS(ascent + descent);