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 <tonvandenheu...@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 @@ -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