Changeset 4140 for trunk/lisp/international/mule-diag.el
- Timestamp:
- 08/10/06 11:19:54 (2 years ago)
- Files:
-
- trunk/lisp/international/mule-diag.el (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/international/mule-diag.el
r3894 r4140 1040 1040 ;;;###autoload 1041 1041 (defun describe-font (fontname) 1042 "Display information about fonts which partially match FONTNAME." 1043 (interactive "sFontname (default current choice for ASCII chars): ") 1042 "Display information about a font whose name is FONTNAME. 1043 The font must be already used by Emacs." 1044 (interactive "sFont name (default current choice for ASCII chars): ") 1044 1045 (or (and window-system (fboundp 'fontset-list)) 1045 (error "No fontsets being used")) 1046 (when (or (not fontname) (= (length fontname) 0)) 1047 (setq fontname (cdr (assq 'font (frame-parameters)))) 1048 (if (query-fontset fontname) 1049 (setq fontname 1050 (nth 1 (assq 'ascii (aref (fontset-info fontname) 2)))))) 1051 (let ((font-info (font-info fontname))) 1046 (error "No fonts being used")) 1047 (let (fontset font-info) 1048 (when (or (not fontname) (= (length fontname) 0)) 1049 (setq fontname (frame-parameter nil 'font)) 1050 ;; Check if FONTNAME is a fontset. 1051 (if (query-fontset fontname) 1052 (setq fontset fontname 1053 fontname (nth 1 (assq 'ascii 1054 (aref (fontset-info fontname) 2)))))) 1055 (setq font-info (font-info fontname)) 1052 1056 (if (null font-info) 1053 (message "No matching font") 1057 (if fontset 1058 ;; The font should be surely used. So, there's some 1059 ;; problem about getting information about it. It is 1060 ;; better to print the fontname to show which font has 1061 ;; this problem. 1062 (message "No information about \"%s\"" fontname) 1063 (message "No matching font being used")) 1054 1064 (with-output-to-temp-buffer "*Help*" 1055 1065 (describe-font-internal font-info 'verbose)))))
