From 79b553dde43e11b176ee22a7fa21d6449d597f95 Mon Sep 17 00:00:00 2001 From: Dmitry Karasik Date: Wed, 18 Sep 2024 19:11:50 +0200 Subject: [PATCH] refs #122: calculate properly underline width for glyph-bases strings --- unix/xft.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/xft.c b/unix/xft.c index 6b0b882a3..dc34bd79e 100644 --- a/unix/xft.c +++ b/unix/xft.c @@ -1248,10 +1248,11 @@ prima_xft_glyphs_out( Handle self, PGlyphsOutRec t, int x, int y) XCHECKPOINT; if ( PDrawable( self)-> font. style & (fsUnderlined|fsStruckOut)) { + int l; Point ovx; t-> flags |= toAddOverhangs; - overstrike(self, x, y, &ovx, prima_xft_get_glyphs_width( - self, XX-> font, t, &ovx) - 1); + l = prima_xft_get_glyphs_width( self, XX-> font, t, &ovx); + overstrike(self, x, y, &ovx, l - ovx.x - ovx.y - 1); } XFLUSH;