[util] Account for line-space in surface size

This commit is contained in:
Behdad Esfahbod 2011-09-19 17:57:02 -04:00
parent b5afd8f78e
commit 422558142a
3 changed files with 2 additions and 3 deletions

View File

@ -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, '|');

View File

@ -35,7 +35,6 @@
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <locale.h>

View File

@ -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);