add badweight option
(https://st.suckless.org/patches/nobadweight/st-nobadweight-20220308-4b53196.diff)
This commit is contained in:
parent
3c68c3efa9
commit
b0724cd949
|
@ -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
1
x.c
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 },
|
||||||
|
|
Loading…
Reference in a new issue