diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-21 04:30:02 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-21 04:30:02 +0200 |
commit | 65fd3ca84f75aee0dfebb87fa793dae57c1caf35 (patch) | |
tree | 929b299592e19b39fafc0bbbcccdc6175133f8ef /src/w32font.c | |
parent | 4e9764e6a155aa403d69d38fa06f4a774140f63c (diff) | |
download | emacs-65fd3ca84f75aee0dfebb87fa793dae57c1caf35.tar.gz emacs-65fd3ca84f75aee0dfebb87fa793dae57c1caf35.tar.bz2 emacs-65fd3ca84f75aee0dfebb87fa793dae57c1caf35.zip |
Support the "medium" font weight
* lisp/faces.el (set-face-attribute): Mention new font weights in
doc string.
* src/font.c (struct table_entry): Allow more synonyms.
(weight_table): Expand to support separating medium and normal
weights. Also add heavy/ultra-heavy and some other variants.
(font_parse_fcname): Support more names.
* src/gtkutil.c (xg_weight_to_symbol): Support all the Pango weights.
(xg_style_to_symbol): Make into functions.
(xg_get_font): Adjust.
* src/w32font.c (w32_to_fc_weight): Use symbols.
* src/xfaces.c (syms_of_xfaces): Add the new symbols.
Diffstat (limited to 'src/w32font.c')
-rw-r--r-- | src/w32font.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/w32font.c b/src/w32font.c index 6b9ab0468cd..885daf930b0 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -2000,11 +2000,11 @@ w32_encode_weight (int n) static Lisp_Object w32_to_fc_weight (int n) { - if (n >= FW_HEAVY) return intern ("black"); + if (n >= FW_HEAVY) return Qbold; if (n >= FW_EXTRABOLD) return Qextra_bold; if (n >= FW_BOLD) return Qbold; if (n >= FW_SEMIBOLD) return intern ("demibold"); - if (n >= FW_NORMAL) return intern ("medium"); + if (n >= FW_NORMAL) return Qmedium; if (n >= FW_LIGHT) return Qlight; if (n >= FW_EXTRALIGHT) return Qextra_light; return intern ("thin"); |