aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-04-23 01:34:15 +0000
committerKenichi Handa2009-04-23 01:34:15 +0000
commit493dcf2c9b64d5eb8ef8e218cf1da65ab5f21e92 (patch)
tree7bf259b0da816c939accf32ad0b9e3c60a98e39b /src
parent7f3bc720a8d3dc66df0a1ea4dd470a85fefabdf2 (diff)
downloademacs-493dcf2c9b64d5eb8ef8e218cf1da65ab5f21e92.tar.gz
emacs-493dcf2c9b64d5eb8ef8e218cf1da65ab5f21e92.zip
(Fx_list_fonts): If a font size is specified in PATTERN, set it in
returned scalable fonts.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xfaces.c17
2 files changed, 21 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 58c9272a841..7328c2d54fd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-04-23 Kenichi Handa <handa@m17n.org>
2
3 * xfaces.c (Fx_list_fonts): If a font size is specified in
4 PATTERN, set it in returned scalable fonts.
5
12009-04-22 Chong Yidong <cyd@stupidchicken.com> 62009-04-22 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * keyboard.c (Fset_input_meta_mode): Doc fix. 8 * keyboard.c (Fset_input_meta_mode): Doc fix.
diff --git a/src/xfaces.c b/src/xfaces.c
index 62d2cf22196..fa50d45c952 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1904,7 +1904,22 @@ the WIDTH times as wide as FACE on FRAME. */)
1904 } 1904 }
1905 args[0] = Flist_fonts (font_spec, frame, maximum, font_spec); 1905 args[0] = Flist_fonts (font_spec, frame, maximum, font_spec);
1906 for (tail = args[0]; CONSP (tail); tail = XCDR (tail)) 1906 for (tail = args[0]; CONSP (tail); tail = XCDR (tail))
1907 XSETCAR (tail, Ffont_xlfd_name (XCAR (tail), Qnil)); 1907 {
1908 Lisp_Object font_entity;
1909
1910 font_entity = XCAR (tail);
1911 if ((NILP (AREF (font_entity, FONT_SIZE_INDEX))
1912 || XINT (AREF (font_entity, FONT_SIZE_INDEX)) == 0)
1913 && ! NILP (AREF (font_spec, FONT_SIZE_INDEX)))
1914 {
1915 /* This is a scalable font. For backward compatibility,
1916 we set the specified size. */
1917 font_entity = Fcopy_font_spec (font_entity);
1918 ASET (font_entity, FONT_SIZE_INDEX,
1919 AREF (font_spec, FONT_SIZE_INDEX));
1920 }
1921 XSETCAR (tail, Ffont_xlfd_name (font_entity, Qnil));
1922 }
1908 if (NILP (frame)) 1923 if (NILP (frame))
1909 /* We don't have to check fontsets. */ 1924 /* We don't have to check fontsets. */
1910 return args[0]; 1925 return args[0];