speedie 2022-12-06 20:25:25 +01:00
parent 3c68c3efa9
commit b0724cd949
3 changed files with 4 additions and 1 deletions

View file

@ -38,6 +38,7 @@ static float cxoffset = 0;
static float cyoffset = 0; static float cyoffset = 0;
/* Text drawing options */ /* Text drawing options */
static int badweight = 0; /* Enable badweight detection? This can break certain fonts which is why it's disabled by default. */
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 */
static unsigned int rows = 24; /* Number of rows */ static unsigned int rows = 24; /* Number of rows */

1
x.c
View file

@ -1045,6 +1045,7 @@ xloadfont(Font *f, FcPattern *pattern)
XftResultMatch)) { XftResultMatch)) {
if ((XftPatternGetInteger(f->match->pattern, "weight", 0, if ((XftPatternGetInteger(f->match->pattern, "weight", 0,
&haveattr) != XftResultMatch) || haveattr != wantattr) { &haveattr) != XftResultMatch) || haveattr != wantattr) {
if (badweight)
f->badweight = 1; f->badweight = 1;
fputs("font weight does not match\n", stderr); fputs("font weight does not match\n", stderr);
} }

View file

@ -42,6 +42,7 @@ ResourcePref resources[] = {
{ "defaultcs", INTEGER, &defaultcs }, { "defaultcs", INTEGER, &defaultcs },
{ "defaultrc", INTEGER, &defaultrc }, { "defaultrc", INTEGER, &defaultrc },
{ "cursorstyle", INTEGER, &cursorstyle }, { "cursorstyle", INTEGER, &cursorstyle },
{ "badweight", INTEGER, &badweight },
{ "brightbold", INTEGER, &brightbold }, { "brightbold", INTEGER, &brightbold },
{ "alpha", FLOAT, &alpha }, { "alpha", FLOAT, &alpha },
{ "gradalpha", FLOAT, &gradalpha }, { "gradalpha", FLOAT, &gradalpha },