提交 42255814 编写于 作者: B Behdad Esfahbod

[util] Account for line-space in surface size

上级 b5afd8f7
......@@ -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, '|');
......
......@@ -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>
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册