Re: [dev] [st] bitmap font and chscale 1< line drawing bug

From: <lemon_AT_bitmessage.ch>
Date: Wed, 7 Sep 2016 23:36:47 -0700

On Wed, Sep 07, 2016 at 09:39:08PM -0700, Eric Pruitt wrote:
> Even if you don't debug and / or fix the problem, at least post the
> offending commit, and I will take a look.

I was able to fix it the problem by rolling back part of commit
528241aa3835e2f1f052abeeaf891737712955a0
and all of
0e48a1995eee1c2babc58523ef0be296e4b1c3e8

Here is my patch, it works with my setup but I haven't tested it
rigorously.

diff --git a/st.c b/st.c
index 2594c65..ca126d7 100644
--- a/st.c
+++ b/st.c
_AT_@ -3345,6 +3346,9 @@ xloadfonts(char *fontstr, double fontsize)
                 defaultfontsize = usedfontsize;
         }
 
+ FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcDefaultSubstitute(pattern);
+
         if (xloadfont(&dc.font, pattern))
                 die("st: can't open font %s\n", fontstr);
 
_AT_@ -3667,7 +3671,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
                 specs[numspecs].font = frc[f].font;
                 specs[numspecs].glyph = glyphidx;
                 specs[numspecs].x = (short)xp;
- specs[numspecs].y = (short)yp;
+ specs[numspecs].y = (short)(winy + frc[f].font->ascent);
                 xp += runewidth;
                 numspecs++;
         }

--
lemon
Received on Thu Sep 08 2016 - 08:36:47 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 08 2016 - 08:36:13 CEST