summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2022-12-10 22:13:58 +0000
committerGregory Heytings <gregory@heytings.org>2022-12-10 23:46:16 +0100
commit30e3cb213517461c7dbfe7b4875c92b2606fa2d5 (patch)
tree8f03a8256f271a65d85e7af38e706d72a51fc18e /test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el
parent01154166057e7cf289318a8cfa4d43716f26ca20 (diff)
downloademacs-30e3cb213517461c7dbfe7b4875c92b2606fa2d5.tar.gz
emacs-30e3cb213517461c7dbfe7b4875c92b2606fa2d5.tar.bz2
emacs-30e3cb213517461c7dbfe7b4875c92b2606fa2d5.zip
Unset the weight/slant/width in the spec when realizing a font
Between commits bf0d3f76dc (2014) and 6b1ed2f2c9 (2022), realize_gui_face called font_load_for_lface with an empty or partly emptied font spec, i.e. it ignored a part of its attrs argument. The rationale given in bug#17973, which led to bf0d3f76dc, is not clear. However, 6b1ed2f2c9, which passes the full font spec to font_load_for_lface and font_find_for_lface, leads to suboptimal font choices, for example when the font chosen for the default face has a weight, slant or width that is not supported by other available fonts on the system, such as 'medium' or 'heavy'. If these attributes are not unset here, the call to font_list_entities in font_find_for_lface arbitrarily limits the candidate font list to those that are perfect matches for these attributes, which means that the scoring mechanism is bypassed. Note that the size attribute in spec is also unset, in font_find_for_lface. Also allow unsetting the other attributes, for debugging purposes. * src/xfaces.c (realize_gui_face): Unset the weight, slant and width of the font spec. Fixes bug#57555 and bug#59347. (syms_of_xfaces): New variable 'realize-gui-face-ignored-spec-attributes'.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el')
0 files changed, 0 insertions, 0 deletions