diff --git a/options.h b/options.h index 035e5cf..e017735 100644 --- a/options.h +++ b/options.h @@ -38,6 +38,7 @@ static float cxoffset = 0; static float cyoffset = 0; /* 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 unsigned int cols = 80; /* Number of columns */ static unsigned int rows = 24; /* Number of rows */ diff --git a/x.c b/x.c index ea25bc6..907481c 100644 --- a/x.c +++ b/x.c @@ -1045,7 +1045,8 @@ xloadfont(Font *f, FcPattern *pattern) XftResultMatch)) { if ((XftPatternGetInteger(f->match->pattern, "weight", 0, &haveattr) != XftResultMatch) || haveattr != wantattr) { - f->badweight = 1; + if (badweight) + f->badweight = 1; fputs("font weight does not match\n", stderr); } } diff --git a/xresources.h b/xresources.h index a76484e..bea07c0 100644 --- a/xresources.h +++ b/xresources.h @@ -42,6 +42,7 @@ ResourcePref resources[] = { { "defaultcs", INTEGER, &defaultcs }, { "defaultrc", INTEGER, &defaultrc }, { "cursorstyle", INTEGER, &cursorstyle }, + { "badweight", INTEGER, &badweight }, { "brightbold", INTEGER, &brightbold }, { "alpha", FLOAT, &alpha }, { "gradalpha", FLOAT, &gradalpha },