Re: [dev] [PATCH] Fix vertical character alignment in some cases

From: David Phillips <dbphillipsnz_AT_gmail.com>
Date: Tue, 8 Mar 2016 12:09:51 +1300

On Mon, Mar 07, 2016 at 10:18:12PM +0100, Ton van den Heuvel wrote:
> The y-position of a character found by asking fontconfig for a matching
> font does not take the border pixels into account, resulting in a
> slightly misaligned vertical position.
>
> Signed-off-by: Ton van den Heuvel <tonvandenheuvel_AT_gmail.com>
> ---
> st.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/st.c b/st.c
> index 2473af7..cd803ce 100644
> --- a/st.c
> +++ b/st.c
> _AT_@ -3665,7 +3665,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)(winy + frc[f].font->ascent);
> + specs[numspecs].y = (short)yp;
> xp += runewidth;
> numspecs++;
> }
> --
> 2.7.2
>

Next time, don't forget to tag which project a patch is for in the mail
subject. If this was a patch for a file other than st.c, it may be hard to
tell which project it applies to.

Thanks

Received on Tue Mar 08 2016 - 00:09:51 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 08 2016 - 00:12:36 CET