diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 00:10:03 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-31 14:29:56 -0400 |
commit | 303b4fb73eb8848d18abbda4d151461bd86f1000 (patch) | |
tree | 44024e2ec8933eef1a7a3d62ffc2d35264104634 /pango/pango-glyph-item.h | |
parent | e382a65301847bb432c1bf3f9774ef48e1ec4734 (diff) | |
download | pango-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.h')
-rw-r--r-- | pango/pango-glyph-item.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-glyph-item.h b/pango/pango-glyph-item.h index 6c2f9249..baea69fc 100644 --- a/pango/pango-glyph-item.h +++ b/pango/pango-glyph-item.h @@ -33,6 +33,8 @@ G_BEGIN_DECLS * PangoGlyphItem: * @item: corresponding `PangoItem` * @glyphs: corresponding `PangoGlyphString` + * @baseline: shift of the baseline, relative to the + * containing lines baseline. Positive values shift upwards * * A `PangoGlyphItem` is a pair of a `PangoItem` and the glyphs * resulting from shaping the items text. @@ -45,8 +47,9 @@ typedef struct _PangoGlyphItem PangoGlyphItem; struct _PangoGlyphItem { - PangoItem *item; + PangoItem *item; PangoGlyphString *glyphs; + int y_offset; }; #define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ()) |