From 2babb35916776707d86664664106cf11dc50a6d5 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 16 Jun 2008 11:46:33 +0000 Subject: [PATCH] (Ffont_get): Return a symbol for :weight, :slant, and :width. --- src/ChangeLog | 1 + src/font.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3ccbdc87439..16e21ac3339 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -16,6 +16,7 @@ font-object to nil. (font_close_object): Don't check FONT_CLOSE_OBJECT. (font_at): Don't call font_check_object. + (Ffont_get): Return a symbol for :weight, :slant, and :width. 2008-06-16 Katsumi Yamaoka 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''. VALUE must be a non-negative integer or a floating point number specifying the font size. It specifies the font size in pixels (if VALUE is an integer), or in points (if VALUE is a float). -usage: (font-spec ARGS ...) */) +usage: (font-spec ARGS ...) + +`:name' + +VALUE must be a string of XLFD-style or fontconfig-style font name. */) (nargs, args) int nargs; Lisp_Object *args; @@ -3728,6 +3732,8 @@ FONT is a font-spec, a font-entity, or a font-object. */) CHECK_SYMBOL (key); idx = get_font_prop_index (key); + if (idx >= FONT_WEIGHT_INDEX && idx <= FONT_WIDTH_INDEX) + return font_style_symbolic (font, idx, 0); if (idx >= 0 && idx < FONT_EXTRA_INDEX) return AREF (font, idx); return Fcdr (Fassq (key, AREF (font, FONT_EXTRA_INDEX))); -- 2.39.2