summaryrefslogtreecommitdiff
path: root/pango/pango-glyph-item.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-29 17:26:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-31 14:29:56 -0400
commit1f0b5d5b87b61a37bebd393c0d67cce0b4ccdcb9 (patch)
tree1d9e1e3586a1f3b907385aa1c22a4c3456f147e4 /pango/pango-glyph-item.h
parent1b73eedc69bc15941f216bff11817b825adb51d8 (diff)
downloadpango-1f0b5d5b87b61a37bebd393c0d67cce0b4ccdcb9.tar.gz
Add horizontal displacement
Apply horizontal displacements for superscripts and subscripts that are provided in font metrics. This noticably improves the placement of superscripts in italics. Currently, we only apply these displacements in post-processing, and ignore the width changes during line-breaking. This could be improved by moving the baseline handling into the line-breaking proper.
Diffstat (limited to 'pango/pango-glyph-item.h')
-rw-r--r--pango/pango-glyph-item.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/pango/pango-glyph-item.h b/pango/pango-glyph-item.h
index baea69fc..fd8951d2 100644
--- a/pango/pango-glyph-item.h
+++ b/pango/pango-glyph-item.h
@@ -33,8 +33,12 @@ 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
+ * @y_offset: shift of the baseline, relative to the baseline
+ * of the containing line. Positive values shift upwards
+ * @start_x_offset: horizontal displacement to apply before the
+ * glyph item. Positive values shift right
+ * @end_x_offset: horizontal displacement to apply after th
+ * glyph item. Positive values shift right
*
* A `PangoGlyphItem` is a pair of a `PangoItem` and the glyphs
* resulting from shaping the items text.
@@ -50,6 +54,8 @@ struct _PangoGlyphItem
PangoItem *item;
PangoGlyphString *glyphs;
int y_offset;
+ int start_x_offset;
+ int end_x_offset;
};
#define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ())