summaryrefslogtreecommitdiff
path: root/pango2/pango-hbfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango2/pango-hbfont.c')
-rw-r--r--pango2/pango-hbfont.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pango2/pango-hbfont.c b/pango2/pango-hbfont.c
index a8876224..91f4a305 100644
--- a/pango2/pango-hbfont.c
+++ b/pango2/pango-hbfont.c
@@ -366,7 +366,7 @@ create_hex_box_info (Pango2HbFont *self)
*/
/* We should rotate the box, not glyphs */
- pango2_font_description_unset_fields (desc, PANGO2_FONT_MASK_GRAVITY);
+ pango2_font_description_unset_fields (desc, PANGO2_FONT_MASK_GRAVITY|PANGO2_FONT_MASK_FACEID);
pango2_font_description_set_family_static (desc, "monospace");
@@ -388,12 +388,11 @@ create_hex_box_info (Pango2HbFont *self)
mini_font = pango2_font_map_load_font (map, context, desc);
- g_object_unref (context);
+ get_max_char_size (mini_font, hexdigits, &width, &height);
+ g_object_unref (context);
pango2_font_description_free (desc);
- get_max_char_size (mini_font, hexdigits, &width, &height);
-
hb_font_get_extents_for_direction (hb_font, HB_DIRECTION_LTR, &font_extents);
font_ascent = font_extents.ascender / (double) PANGO2_SCALE;
font_descent = - font_extents.descender / (double) PANGO2_SCALE;