summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/pango-context.c8
-rw-r--r--pango/pango-layout.c11
2 files changed, 13 insertions, 6 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 90952add..d1e447f7 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1413,10 +1413,10 @@ itemize_state_update_for_new_run (ItemizeState *state)
{
gboolean is_emoji = state->emoji_iter.is_emoji;
if (is_emoji && !state->emoji_font_desc)
- {
- state->emoji_font_desc = pango_font_description_copy_static (state->font_desc);
- pango_font_description_set_family_static (state->emoji_font_desc, "emoji");
- }
+ {
+ state->emoji_font_desc = pango_font_description_copy_static (state->font_desc);
+ pango_font_description_set_family_static (state->emoji_font_desc, "emoji");
+ }
state->current_fonts = pango_font_map_load_fontset (state->context->font_map,
state->context,
is_emoji ? state->emoji_font_desc : state->font_desc,
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index df7607fe..2fe6c9dc 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5213,8 +5213,15 @@ pango_layout_line_get_extents_and_height (PangoLayoutLine *line,
tmp_list = tmp_list->next;
}
- if (logical_rect && !line->runs)
- pango_layout_line_get_empty_extents (line, logical_rect);
+ if (!line->runs)
+ {
+ PangoRectangle r, *rect;
+
+ rect = logical_rect ? logical_rect : &r;
+ pango_layout_line_get_empty_extents (line, rect);
+ if (height)
+ *height = rect->height;
+ }
if (caching)
{