On Saturday, March 12th, 2022 at 16:19, Hiltjo Posthuma 
<[email protected]> wrote:

> On Sat, Mar 12, 2022 at 03:24:57PM +0000, Zacchary Dempsey-Plante wrote:
>
> > During my submission of the charoffsets customisation patch, I found that 
> > the underline and strikethrough rendering didn't take `chscale` into 
> > account.
> >
> > This meant that when using `chscale < 1.0`, underlines were not visible.
> >
> > The patch contents are below. Apologies if I've done anything wrong when 
> > submitting my mainline improvement patch - this is my first time 
> > contributing to a suckless project.
> >
> > From ffa6ee44e458e5239c2e5ad24f867ee7fd8832ef Mon Sep 17 00:00:00 2001
> >
> > From: Zacchary Dempsey-Plante [email protected]
> >
> > Date: Sat, 12 Mar 2022 09:39:41 -0500
> >
> > Subject: [PATCH] Made underlines and strikethroughs respect `chscale`.
> >
> > ---
> >
> > x.c | 4 ++--
> >
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/x.c b/x.c
> >
> > index cd96575..2a3bd38 100644
> >
> > --- a/x.c
> >
> > +++ b/x.c
> >
> > @@ -1493,12 +1493,12 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, 
> > Glyph base, int len, int x, i
> >
> > /* Render underline and strikethrough. */
> >
> > if (base.mode & ATTR_UNDERLINE) {
> >
> > - XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1,
> >
> > + XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent * chscale + 1,
> >
> > width, 1);
> >
> > }
> >
> > if (base.mode & ATTR_STRUCK) {
> >
> > - XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3,
> >
> > + XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent * chscale / 3,
> >
> > width, 1);
> >
> > }
> >
> > --
> >
> > 2.35.1
>
> Please don't submit wiki patches to the hackers mailinglist.
>
> Just push it to the wiki.
>
> --
>
> Kind regards,
>
> Hiltjo

I wasn't submitting it as a wiki patch - I believe this fix should be in the 
mainline, because `chscale` is a core config option.
When I mentioned the community patch, I was talking about a separate patch I 
had previously submitted to the wiki that was *related*, but different. This 
patch is a mainline fix.

Thank you,
Zacc

Reply via email to