Skip to content

Commit

Permalink
refs #122: calculate properly underline width for glyph-bases strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Sep 18, 2024
1 parent e7a0fd2 commit 79b553d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unix/xft.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 79b553d

Please sign in to comment.