aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon van den Heuvel <tonvandenheuvel@gmail.com>2016-03-07 22:18:12 +0100
committerChristoph Lohmann <20h@r-36.net>2016-03-08 15:43:52 +0100
commit0e48a1995eee1c2babc58523ef0be296e4b1c3e8 (patch)
treee9396279690453ee1c3e4789fd34080dac7cbf0c
parent6d8f85232ec741ae2357728d6e96cb8a44e842b4 (diff)
downloadst-patched-0e48a1995eee1c2babc58523ef0be296e4b1c3e8.tar.bz2
st-patched-0e48a1995eee1c2babc58523ef0be296e4b1c3e8.tar.xz
st-patched-0e48a1995eee1c2babc58523ef0be296e4b1c3e8.zip
Fix vertical character alignment in some cases
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@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index ca126d7..f2b3095 100644
--- a/st.c
+++ b/st.c
@@ -3671,7 +3671,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
3671 specs[numspecs].font = frc[f].font; 3671 specs[numspecs].font = frc[f].font;
3672 specs[numspecs].glyph = glyphidx; 3672 specs[numspecs].glyph = glyphidx;
3673 specs[numspecs].x = (short)xp; 3673 specs[numspecs].x = (short)xp;
3674 specs[numspecs].y = (short)(winy + frc[f].font->ascent); 3674 specs[numspecs].y = (short)yp;
3675 xp += runewidth; 3675 xp += runewidth;
3676 numspecs++; 3676 numspecs++;
3677 } 3677 }