From 84c5362ffe22afa6ffa0fe3f09a2d265b9c7b321 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sun, 17 Dec 2023 09:46:45 +0100 Subject: Fix font padding --- drw.c | 1 + drw.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drw.c b/drw.c index a58a2b4..0ea9a40 100644 --- a/drw.c +++ b/drw.c @@ -135,6 +135,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) font = ecalloc(1, sizeof(Fnt)); font->xfont = xfont; + font->xfont->ascent += font_ascent_pad; font->pattern = pattern; font->h = xfont->ascent + xfont->descent; font->dpy = drw->dpy; diff --git a/drw.h b/drw.h index 6471431..c3e678c 100644 --- a/drw.h +++ b/drw.h @@ -1,5 +1,7 @@ /* See LICENSE file for copyright and license details. */ +static const int font_ascent_pad = 3; + typedef struct { Cursor cursor; } Cur; -- cgit v1.2.3