summaryrefslogtreecommitdiff
path: root/pango/pango-item.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-12-10 12:49:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-12-19 10:40:34 -0500
commit704662e39856e308ef1683be607d62db0b738708 (patch)
tree438fd00eba4b44afd4cf81b6618eb68624d43e88 /pango/pango-item.c
parent6770050e74cf83830e255f1d1e9b574feb5a60fc (diff)
downloadpango-704662e39856e308ef1683be607d62db0b738708.tar.gz
Fix line height with emulated small capsfix-small-caps-line-height
When we change font scale for emulating small caps, keep the original font around in the analysis, and use it for calculating the run height. Fixes: #622
Diffstat (limited to 'pango/pango-item.c')
-rw-r--r--pango/pango-item.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/pango-item.c b/pango/pango-item.c
index d7291a08..c599241f 100644
--- a/pango/pango-item.c
+++ b/pango/pango-item.c
@@ -68,6 +68,9 @@ pango_item_copy (PangoItem *item)
((PangoItemPrivate *)result)->char_offset = ((PangoItemPrivate *)item)->char_offset;
result->analysis = item->analysis;
+ if (result->analysis.lang_engine)
+ g_object_ref (result->analysis.lang_engine);
+
if (result->analysis.font)
g_object_ref (result->analysis.font);
@@ -102,6 +105,9 @@ pango_item_free (PangoItem *item)
g_slist_free (item->analysis.extra_attrs);
}
+ if (item->analysis.lang_engine)
+ g_object_unref (item->analysis.lang_engine);
+
if (item->analysis.font)
g_object_unref (item->analysis.font);