Skip to content

Commit

Permalink
wide glyphs: adding alternative patch ref. #56
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkeby committed Aug 11, 2022
1 parent bdeb1e7 commit bcfa5b9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,9 +1837,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
int width = charlen * win.cw;
Color *fg, *bg, *temp, revfg, revbg, truefg, truebg;
XRenderColor colfg, colbg;
#if !WIDE_GLYPHS_PATCH
XRectangle r;
#endif // WIDE_GLYPHS_PATCH

/* Fallback on color display for attributes not supported by the font */
if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) {
Expand Down Expand Up @@ -1992,18 +1990,22 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
xclear(winx, winy, winx + width, winy + win.ch);
else
#endif // BACKGROUND_IMAGE_PATCH

#if !WIDE_GLYPHS_PATCH
XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);
#if WIDE_GLYPHS_PATCH
}
#endif // WIDE_GLYPHS_PATCH

#if !WIDE_GLYPHS_PATCH
/* Set the clip region because Xft is sometimes dirty. */
r.x = 0;
r.y = 0;
r.height = win.ch;
r.width = width;
XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1);

#if WIDE_GLYPHS_PATCH
/* Fill the background */
XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);
}
#endif // WIDE_GLYPHS_PATCH

#if WIDE_GLYPHS_PATCH
Expand Down Expand Up @@ -2421,10 +2423,8 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
}
#endif // OPENURLONCLICK_PATCH

#if !WIDE_GLYPHS_PATCH
/* Reset clip to none. */
XftDrawSetClip(xw.draw, 0);
#endif // WIDE_GLYPHS_PATCH
}

void
Expand Down

0 comments on commit bcfa5b9

Please sign in to comment.