aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2000-07-10 04:01:01 +0000
committerKenichi Handa2000-07-10 04:01:01 +0000
commita921395d874d3e192c84b5b6d3bb84920f0e2add (patch)
treed9a86a80c55fbc1998a686df0ccc4e83b4e89003 /src
parentf45aab653b455d319ad271b0a43939a4c3f07e37 (diff)
downloademacs-a921395d874d3e192c84b5b6d3bb84920f0e2add.tar.gz
emacs-a921395d874d3e192c84b5b6d3bb84920f0e2add.zip
(Ffontset_info): Make the return value more compatible
with that of Emacs 20.
Diffstat (limited to 'src')
-rw-r--r--src/fontset.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 3f26c7958ff..8d073163793 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1221,10 +1221,11 @@ accumulate_font_info (arg, character, elt)
1221 1221
1222DEFUN ("fontset-info", Ffontset_info, Sfontset_info, 1, 2, 0, 1222DEFUN ("fontset-info", Ffontset_info, Sfontset_info, 1, 2, 0,
1223 "Return information about a fontset named NAME on frame FRAME.\n\ 1223 "Return information about a fontset named NAME on frame FRAME.\n\
1224The value is a list:\n\ 1224The value is a vector:\n\
1225 \(FONTSET-NAME (CHARSET-OR-RANGE FONT-SPEC OPENED ...) ...),\n\ 1225 [ SIZE HEIGHT ((CHARSET-OR-RANGE FONT-SPEC OPENED ...) ...) ],\n\
1226where,\n\ 1226where,\n\
1227 FONTSET-NAME is a full name of the fontset.\n\ 1227 SIZE is the maximum bound width of ASCII font in the fontset,\n\
1228 HEIGHT is the maximum bound height of ASCII font in the fontset,\n\
1228 CHARSET-OR-RANGE is a charset, a character (may be a generic character)\n\ 1229 CHARSET-OR-RANGE is a charset, a character (may be a generic character)\n\
1229 or a cons of two characters specifying the range of characters.\n\ 1230 or a cons of two characters specifying the range of characters.\n\
1230 FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY),\n\ 1231 FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY),\n\
@@ -1233,6 +1234,7 @@ where,\n\
1233 FAMILY may contain a `FOUNDARY' field at the head.\n\ 1234 FAMILY may contain a `FOUNDARY' field at the head.\n\
1234 REGISTRY may contain a `CHARSET_ENCODING' field at the tail.\n\ 1235 REGISTRY may contain a `CHARSET_ENCODING' field at the tail.\n\
1235 OPENEDs are names of fonts actually opened.\n\ 1236 OPENEDs are names of fonts actually opened.\n\
1237If the ASCII font is not yet opened, SIZE and HEIGHT are 0.\n\
1236If FRAME is omitted, it defaults to the currently selected frame.") 1238If FRAME is omitted, it defaults to the currently selected frame.")
1237 (name, frame) 1239 (name, frame)
1238 Lisp_Object name, frame; 1240 Lisp_Object name, frame;
@@ -1242,6 +1244,7 @@ If FRAME is omitted, it defaults to the currently selected frame.")
1242 Lisp_Object indices[3]; 1244 Lisp_Object indices[3];
1243 Lisp_Object val, tail, elt; 1245 Lisp_Object val, tail, elt;
1244 Lisp_Object *realized; 1246 Lisp_Object *realized;
1247 struct font_info *fontp = NULL;
1245 int n_realized = 0; 1248 int n_realized = 0;
1246 int i; 1249 int i;
1247 1250
@@ -1313,7 +1316,17 @@ If FRAME is omitted, it defaults to the currently selected frame.")
1313 } 1316 }
1314 } 1317 }
1315 } 1318 }
1316 return Fcons (FONTSET_NAME (fontset), val); 1319
1320 elt = Fcdr (Fcdr (Fassq (CHARSET_SYMBOL (CHARSET_ASCII), val)));
1321 if (CONSP (elt))
1322 {
1323 elt = XCAR (elt);
1324 fontp = (*query_font_func) (f, XSTRING (elt)->data);
1325 }
1326 val = Fmake_vector (make_number (3), val);
1327 AREF (val, 0) = fontp ? make_number (fontp->size) : make_number (0);
1328 AREF (val, 1) = fontp ? make_number (fontp->height) : make_number (0);
1329 return val;
1317} 1330}
1318 1331
1319DEFUN ("fontset-font", Ffontset_font, Sfontset_font, 2, 2, 0, 1332DEFUN ("fontset-font", Ffontset_font, Sfontset_font, 2, 2, 0,