From 422558142aabb996d8ad1848df7ea4d5a8ade98a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 19 Sep 2011 17:57:02 -0400 Subject: [PATCH] [util] Account for line-space in surface size --- util/options.cc | 2 +- util/options.hh | 1 - util/view-cairo.cc | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/util/options.cc b/util/options.cc index a48f60612..97be63520 100644 --- a/util/options.cc +++ b/util/options.cc @@ -640,7 +640,7 @@ format_options_t::serialize (hb_buffer_t *buffer, hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, NULL); g_string_append_c (gs, '<'); - for (unsigned int i = 0; i < (int) num_glyphs; i++) + for (unsigned int i = 0; i < num_glyphs; i++) { if (i) g_string_append_c (gs, '|'); diff --git a/util/options.hh b/util/options.hh index af9bedb7b..171fbe688 100644 --- a/util/options.hh +++ b/util/options.hh @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/util/view-cairo.cc b/util/view-cairo.cc index 467114791..f766a4fe4 100644 --- a/util/view-cairo.cc +++ b/util/view-cairo.cc @@ -65,7 +65,7 @@ view_cairo_t::get_surface_size (cairo_scaled_font_t *scaled_font, *h = font_extents.ascent + font_extents.descent - + ((int) lines->len - 1) * font_extents.height; + + ((int) lines->len - 1) * (font_extents.height + line_space); *w = 0; for (unsigned int i = 0; i < lines->len; i++) { helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);