summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h3
-rw-r--r--x.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h
index 92facb0..b721502 100644
--- a/config.def.h
+++ b/config.def.h
@@ -35,6 +35,9 @@ char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
+/* Character rendering offsets in pixels */
+static short cxoffset = 0;
+static short cyoffset = 0;
/*
* word delimiter string
diff --git a/x.c b/x.c
index a077ca6..7727222 100644
--- a/x.c
+++ b/x.c
@@ -1430,8 +1430,8 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
if (glyphidx) {
specs[numspecs].font = font->match;
specs[numspecs].glyph = glyphidx;
- specs[numspecs].x = (short)xp;
- specs[numspecs].y = (short)yp;
+ specs[numspecs].x = (short)xp + cxoffset;
+ specs[numspecs].y = (short)yp + cyoffset;
xp += runewidth;
numspecs++;
continue;