Variable: face-font-lax-matched-attributes

face-font-lax-matched-attributes is a variable defined in xfaces.c.

Value

t

Documentation

Whether to match some face attributes in lax manner when realizing faces.

If non-nil, some font-related face attributes will be matched in a lax manner when looking for candidate fonts. If the value is t, the default, the search for fonts will not insist on exact match for 3 font attributes: weight, width, and slant. Instead, it will examine the available fonts with various values of these attributes, and select the font that is the closest possible match. (If an exact match is available, it will still be selected,
as that is the closest match.) For example, looking for a semi-bold
font might select a bold or a medium-weight font if no semi-bold font matching other attributes can be found. This is especially important when the default face specifies unusual values for one or more of these 3 attributes, which other installed fonts don't support.

The value can also be a list of font-related face attribute symbols; see set-face-attribute for the full list of attributes. Then the corresponding face attributes will be treated as "soft" constraints in the manner described above, instead of the default 3 attributes.

If the value is nil, candidate fonts might be rejected if the don't have exactly the same values of attributes as the face requests.

This variable exists for debugging of the font-selection process, and we advise not to change it otherwise.

Source Code

// Defined in /usr/src/emacs/src/xfaces.c
  DEFVAR_LISP ("face-font-lax-matched-attributes",
	       Vface_font_lax_matched_attributes,
	       doc: /* Whether to match some face attributes in lax manner when realizing faces.

If non-nil, some font-related face attributes will be matched in a lax
manner when looking for candidate fonts.
If the value is t, the default, the search for fonts will not insist
on exact match for 3 font attributes: weight, width, and slant.
Instead, it will examine the available fonts with various values of
these attributes, and select the font that is the closest possible
match.  (If an exact match is available, it will still be selected,
as that is the closest match.)  For example, looking for a semi-bold
font might select a bold or a medium-weight font if no semi-bold font
matching other attributes can be found.  This is especially important
when the `default' face specifies unusual values for one or more of
these 3 attributes, which other installed fonts don't support.

The value can also be a list of font-related face attribute symbols;
see `set-face-attribute' for the full list of attributes.  Then the
corresponding face attributes will be treated as "soft" constraints
in the manner described above, instead of the default 3 attributes.

If the value is nil, candidate fonts might be rejected if the don't
have exactly the same values of attributes as the face requests.

This variable exists for debugging of the font-selection process,
and we advise not to change it otherwise.  */);