Add charoffsets
This commit is contained in:
parent
7eaf6f5435
commit
9f722b6034
|
@ -10,7 +10,7 @@
|
||||||
*
|
*
|
||||||
* Font options
|
* Font options
|
||||||
*/
|
*/
|
||||||
static char *font[] = { "Cascadia Code PL:size=8:style=Bold:antialias=true:autohint=true",
|
static char *font[] = { "Fantasque Sans Mono:size=8:style=Bold:antialias=true:autohint=true",
|
||||||
"DejaVu Sans Mono:size=8:antialias=true:autohint=true",
|
"DejaVu Sans Mono:size=8:antialias=true:autohint=true",
|
||||||
"Noto Color Emoji:size=8:antialias=true:autohint=true",
|
"Noto Color Emoji:size=8:antialias=true:autohint=true",
|
||||||
"fontawesome:size=8:antialias=true:autohint=true",
|
"fontawesome:size=8:antialias=true:autohint=true",
|
||||||
|
@ -31,6 +31,10 @@ char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
|
||||||
static float cwscale = 1.0;
|
static float cwscale = 1.0;
|
||||||
static float chscale = 1.0;
|
static float chscale = 1.0;
|
||||||
|
|
||||||
|
/* Character rendering offsets in pixels */
|
||||||
|
static float cxoffset = 0;
|
||||||
|
static float cyoffset = 0;
|
||||||
|
|
||||||
/* Text drawing options */
|
/* Text drawing options */
|
||||||
static int brightbold = 0; /* Should bright text also be bold? */
|
static int brightbold = 0; /* Should bright text also be bold? */
|
||||||
static unsigned int cols = 80; /* Number of columns */
|
static unsigned int cols = 80; /* Number of columns */
|
||||||
|
|
4
x.c
4
x.c
|
@ -1532,8 +1532,8 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
|
||||||
if (glyphidx) {
|
if (glyphidx) {
|
||||||
specs[numspecs].font = font->match;
|
specs[numspecs].font = font->match;
|
||||||
specs[numspecs].glyph = glyphidx;
|
specs[numspecs].glyph = glyphidx;
|
||||||
specs[numspecs].x = (short)xp;
|
specs[numspecs].x = (short)xp + cxoffset;
|
||||||
specs[numspecs].y = (short)yp;
|
specs[numspecs].y = (short)yp + cyoffset;
|
||||||
xp += runewidth;
|
xp += runewidth;
|
||||||
numspecs++;
|
numspecs++;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -47,4 +47,6 @@ ResourcePref resources[] = {
|
||||||
{ "statalpha", FLOAT, &statalpha },
|
{ "statalpha", FLOAT, &statalpha },
|
||||||
{ "cwscale", FLOAT, &cwscale },
|
{ "cwscale", FLOAT, &cwscale },
|
||||||
{ "chscale", FLOAT, &chscale },
|
{ "chscale", FLOAT, &chscale },
|
||||||
|
{ "cyoffset", FLOAT, &cyoffset },
|
||||||
|
{ "cxoffset", FLOAT, &cxoffset },
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue