[util] Account for line-space in surface size
This commit is contained in:
parent
b5afd8f78e
commit
422558142a
|
@ -640,7 +640,7 @@ format_options_t::serialize (hb_buffer_t *buffer,
|
||||||
hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, NULL);
|
hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, NULL);
|
||||||
|
|
||||||
g_string_append_c (gs, '<');
|
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)
|
if (i)
|
||||||
g_string_append_c (gs, '|');
|
g_string_append_c (gs, '|');
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
|
@ -65,7 +65,7 @@ view_cairo_t::get_surface_size (cairo_scaled_font_t *scaled_font,
|
||||||
|
|
||||||
*h = font_extents.ascent
|
*h = font_extents.ascent
|
||||||
+ font_extents.descent
|
+ font_extents.descent
|
||||||
+ ((int) lines->len - 1) * font_extents.height;
|
+ ((int) lines->len - 1) * (font_extents.height + line_space);
|
||||||
*w = 0;
|
*w = 0;
|
||||||
for (unsigned int i = 0; i < lines->len; i++) {
|
for (unsigned int i = 0; i < lines->len; i++) {
|
||||||
helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
|
helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
|
||||||
|
|
Loading…
Reference in New Issue