summaryrefslogtreecommitdiff
path: root/pango/pango-glyph-item.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-29 00:10:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-31 14:29:56 -0400
commit303b4fb73eb8848d18abbda4d151461bd86f1000 (patch)
tree44024e2ec8933eef1a7a3d62ffc2d35264104634 /pango/pango-glyph-item.c
parente382a65301847bb432c1bf3f9774ef48e1ec4734 (diff)
downloadpango-303b4fb73eb8848d18abbda4d151461bd86f1000.tar.gz
Implement baseline shifts
Add a new baseline-shift attribute, which is similar to rise, but accumulates. In addition, it supports font- relative values such as superscript and subscript. We implement support for this by computing baseline shifts for run during line post-processing, and storing them in the runs. The renderer now takes these shifts into account when rendering layout lines.
Diffstat (limited to 'pango/pango-glyph-item.c')
-rw-r--r--pango/pango-glyph-item.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c
index 5e6ca7b6..c64bfa13 100644
--- a/pango/pango-glyph-item.c
+++ b/pango/pango-glyph-item.c
@@ -129,6 +129,8 @@ pango_glyph_item_split (PangoGlyphItem *orig,
pango_glyph_string_set_size (orig->glyphs, orig->glyphs->num_glyphs - num_glyphs);
+ new->y_offset = orig->y_offset;
+
return new;
}
@@ -154,6 +156,7 @@ pango_glyph_item_copy (PangoGlyphItem *orig)
result->item = pango_item_copy (orig->item);
result->glyphs = pango_glyph_string_copy (orig->glyphs);
+ result->y_offset = orig->y_offset;
return result;
}
@@ -196,7 +199,7 @@ G_DEFINE_BOXED_TYPE (PangoGlyphItem, pango_glyph_item,
* Since: 1.22
*/
PangoGlyphItemIter *
-pango_glyph_item_iter_copy (PangoGlyphItemIter *orig)
+pango_glyph_item_iter_copy (PangoGlyphItemIter *orig)
{
PangoGlyphItemIter *result;