1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00

Allow choosing regular-weighted fonts when medium-weighted exist

* src/ftfont.c (ftfont_pattern_entity): Allow using both regular
and medium-weighted fonts.
This commit is contained in:
Lars Ingebrigtsen 2021-11-12 07:19:19 +01:00
parent fc00fe53e1
commit dae3c4e89b

View file

@ -225,8 +225,6 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
}
if (FcPatternGetInteger (p, FC_WEIGHT, 0, &numeric) == FcResultMatch)
{
if (numeric >= FC_WEIGHT_REGULAR && numeric < FC_WEIGHT_MEDIUM)
numeric = FC_WEIGHT_MEDIUM;
FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX, make_fixnum (numeric));
}
if (FcPatternGetInteger (p, FC_SLANT, 0, &numeric) == FcResultMatch)