summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-10-31 00:07:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-10-31 00:07:52 -0400
commitfe1c54b984a92d8b82a3fdb9bc88716f17e81be3 (patch)
tree1b4f48733f4921e82ce7a2d7f774255caa6b7854
parent7c710faa1edd58109c4ac1972ae5aca10f1be87f (diff)
downloadpango-fe1c54b984a92d8b82a3fdb9bc88716f17e81be3.tar.gz
Make logical glyph extents better
For east and west gravity, the logical glyph extents were still misaligned with the ink extents.
-rw-r--r--pango/pangocairo-font.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c
index 503f863b..597a320d 100644
--- a/pango/pangocairo-font.c
+++ b/pango/pangocairo-font.c
@@ -934,12 +934,14 @@ _pango_cairo_font_private_get_glyph_extents (PangoCairoFontPrivate *cf_priv,
break;
case PANGO_GRAVITY_EAST:
logical_rect->width = cf_priv->font_extents.height;
+ logical_rect->x = - logical_rect->width;
break;
case PANGO_GRAVITY_NORTH:
logical_rect->width = entry->width;
break;
case PANGO_GRAVITY_WEST:
logical_rect->width = - cf_priv->font_extents.height;
+ logical_rect->x = - logical_rect->width;
break;
case PANGO_GRAVITY_AUTO:
default: