aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2019-11-17 18:19:18 +0200
committerEli Zaretskii2019-11-17 18:19:18 +0200
commitb31f1987eb27a69d7c0eab9cce6eab8ba0857ec1 (patch)
tree53b98b537628ffe78f26b836b94585c9f63b04bb /src
parent7c6335de5e0ac4176911a39bad5344028f39b8ff (diff)
downloademacs-b31f1987eb27a69d7c0eab9cce6eab8ba0857ec1.tar.gz
emacs-b31f1987eb27a69d7c0eab9cce6eab8ba0857ec1.zip
Support more font weight values on MS-Windows
* src/w32font.c (w32_to_fc_weight): Support a few more weight values, for compatibility with the GTK font selection widget (see gtkutil.c:XG_WEIGHT_TO_SYMBOL). (Bug#24226)
Diffstat (limited to 'src')
-rw-r--r--src/w32font.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/w32font.c b/src/w32font.c
index 9a334717c12..60020eab4a0 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -2000,11 +2000,14 @@ w32_encode_weight (int n)
2000static Lisp_Object 2000static Lisp_Object
2001w32_to_fc_weight (int n) 2001w32_to_fc_weight (int n)
2002{ 2002{
2003 if (n >= FW_EXTRABOLD) return intern ("black"); 2003 if (n >= FW_HEAVY) return intern ("black");
2004 if (n >= FW_EXTRABOLD) return Qextra_bold;
2004 if (n >= FW_BOLD) return Qbold; 2005 if (n >= FW_BOLD) return Qbold;
2005 if (n >= FW_SEMIBOLD) return intern ("demibold"); 2006 if (n >= FW_SEMIBOLD) return intern ("demibold");
2006 if (n >= FW_NORMAL) return intern ("medium"); 2007 if (n >= FW_NORMAL) return intern ("medium");
2007 return Qlight; 2008 if (n >= FW_LIGHT) return Qlight;
2009 if (n >= FW_EXTRALIGHT) return Qextra_light;
2010 return intern ("thin");
2008} 2011}
2009 2012
2010/* Fill in all the available details of LOGFONT from FONT_SPEC. */ 2013/* Fill in all the available details of LOGFONT from FONT_SPEC. */