aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-06-16 11:46:33 +0000
committerKenichi Handa2008-06-16 11:46:33 +0000
commit2babb35916776707d86664664106cf11dc50a6d5 (patch)
treeeafc85bffc8ece09c3ed85576bca62a6da6a0dae /src
parentd91e2cb64e6d8be6d1138b242cf6b6c04fe1ed91 (diff)
downloademacs-2babb35916776707d86664664106cf11dc50a6d5.tar.gz
emacs-2babb35916776707d86664664106cf11dc50a6d5.zip
(Ffont_get): Return a symbol for :weight, :slant, and :width.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/font.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3ccbdc87439..16e21ac3339 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -16,6 +16,7 @@
16 font-object to nil. 16 font-object to nil.
17 (font_close_object): Don't check FONT_CLOSE_OBJECT. 17 (font_close_object): Don't check FONT_CLOSE_OBJECT.
18 (font_at): Don't call font_check_object. 18 (font_at): Don't call font_check_object.
19 (Ffont_get): Return a symbol for :weight, :slant, and :width.
19 20
202008-06-16 Katsumi Yamaoka <yamaoka@jpl.org> 212008-06-16 Katsumi Yamaoka <yamaoka@jpl.org>
21 22
diff --git a/src/font.c b/src/font.c
index 4d2f486181f..6ccef312d7a 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3627,7 +3627,11 @@ encoding of a font, e.g. ``iso8859-1''.
3627VALUE must be a non-negative integer or a floating point number 3627VALUE must be a non-negative integer or a floating point number
3628specifying the font size. It specifies the font size in pixels 3628specifying the font size. It specifies the font size in pixels
3629(if VALUE is an integer), or in points (if VALUE is a float). 3629(if VALUE is an integer), or in points (if VALUE is a float).
3630usage: (font-spec ARGS ...) */) 3630usage: (font-spec ARGS ...)
3631
3632`:name'
3633
3634VALUE must be a string of XLFD-style or fontconfig-style font name. */)
3631 (nargs, args) 3635 (nargs, args)
3632 int nargs; 3636 int nargs;
3633 Lisp_Object *args; 3637 Lisp_Object *args;
@@ -3728,6 +3732,8 @@ FONT is a font-spec, a font-entity, or a font-object. */)
3728 CHECK_SYMBOL (key); 3732 CHECK_SYMBOL (key);
3729 3733
3730 idx = get_font_prop_index (key); 3734 idx = get_font_prop_index (key);
3735 if (idx >= FONT_WEIGHT_INDEX && idx <= FONT_WIDTH_INDEX)
3736 return font_style_symbolic (font, idx, 0);
3731 if (idx >= 0 && idx < FONT_EXTRA_INDEX) 3737 if (idx >= 0 && idx < FONT_EXTRA_INDEX)
3732 return AREF (font, idx); 3738 return AREF (font, idx);
3733 return Fcdr (Fassq (key, AREF (font, FONT_EXTRA_INDEX))); 3739 return Fcdr (Fassq (key, AREF (font, FONT_EXTRA_INDEX)));