From 24313ea75a6d59c25c990a4f68990c04a221818c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Nov 2018 17:13:21 +0100 Subject: [PATCH] particle/string: take font's y_offset into account --- particles/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/particles/string.c b/particles/string.c index e920986..dd6deb7 100644 --- a/particles/string.c +++ b/particles/string.c @@ -42,7 +42,7 @@ expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height) cairo_scaled_font_text_to_glyphs( scaled, x + exposable->particle->left_margin, - (double)y + ((double)height - extents.y_bearing) / 2, + (double)y + ((double)height - extents.y_bearing) / 2 + font_y_offset(e->font), e->text, strlen(e->text), &glyphs, &num_glyphs, &clusters, &num_clusters, &cluster_flags);