diff lisp/international/mule-diag.el @ 91515:2ebe99b97e12

(print-fontset-element): Handle the case of inhibitting the fallback fonts.
author Kenichi Handa <handa@m17n.org>
date Mon, 04 Feb 2008 12:17:00 +0000
parents 606f2d163a64
children 1e3a407766b9
line wrap: on
line diff
--- a/lisp/international/mule-diag.el	Mon Feb 04 12:16:40 2008 +0000
+++ b/lisp/international/mule-diag.el	Mon Feb 04 12:17:00 2008 +0000
@@ -876,44 +876,46 @@
 
     ;; Insert a requested font name.
     (dolist (elt val)
-      (let ((requested (car elt)))
-	(if (stringp requested)
-	    (insert "\n    " requested)
-	  (let (family registry weight slant width adstyle)
-	    (if (and (fboundp 'fontp) (fontp requested))
-		(setq family (font-get requested :family)
-		      registry (font-get requested :registry)
-		      weight (font-get requested :weight)
-		      slant (font-get requested :slant)
-		      width (font-get requested :width)
-		      adstyle (font-get requested :adstyle))
-	      (setq family (aref requested 0)
-		    registry (aref requested 5)
-		    weight (aref requested 1)
-		    slant (aref requested 2)
-		    width (aref requested 3)
-		    adstyle (aref requested 4)))
-	    (if (not family)
-		(setq family "*-*")
-	      (if (symbolp family)
-		  (setq family (symbol-name family)))
-	      (or (string-match "-" family)
-		  (setq family (concat "*-" family))))
-	    (if (not registry)
-		(setq registry "*-*")
-	      (if (symbolp registry)
-		  (setq registry (symbol-name registry)))
-	      (or (string-match "-" registry)
-		  (= (aref registry (1- (length registry))) ?*)
-		  (setq registry (concat registry "*"))))
-	    (insert (format"\n    -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s"
-			   family (or weight "*") (or slant "*") (or width "*")
-			   (or adstyle "*") registry)))))
+      (if (not elt)
+	  (insert "\n    -- inhibit fallback fonts --")
+	(let ((requested (car elt)))
+	  (if (stringp requested)
+	      (insert "\n    " requested)
+	    (let (family registry weight slant width adstyle)
+	      (if (and (fboundp 'fontp) (fontp requested))
+		  (setq family (font-get requested :family)
+			registry (font-get requested :registry)
+			weight (font-get requested :weight)
+			slant (font-get requested :slant)
+			width (font-get requested :width)
+			adstyle (font-get requested :adstyle))
+		(setq family (aref requested 0)
+		      registry (aref requested 5)
+		      weight (aref requested 1)
+		      slant (aref requested 2)
+		      width (aref requested 3)
+		      adstyle (aref requested 4)))
+	      (if (not family)
+		  (setq family "*-*")
+		(if (symbolp family)
+		    (setq family (symbol-name family)))
+		(or (string-match "-" family)
+		    (setq family (concat "*-" family))))
+	      (if (not registry)
+		  (setq registry "*-*")
+		(if (symbolp registry)
+		    (setq registry (symbol-name registry)))
+		(or (string-match "-" registry)
+		    (= (aref registry (1- (length registry))) ?*)
+		    (setq registry (concat registry "*"))))
+	      (insert (format"\n    -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s"
+			     family (or weight "*") (or slant "*") (or width "*")
+			     (or adstyle "*") registry)))))
 
-      ;; Insert opened font names (if any).
-      (if (and (boundp 'print-opened) (symbol-value 'print-opened))
-	  (dolist (opened (cdr elt))
-	    (insert "\n\t[" opened "]"))))))
+	;; Insert opened font names (if any).
+	(if (and (boundp 'print-opened) (symbol-value 'print-opened))
+	    (dolist (opened (cdr elt))
+	      (insert "\n\t[" opened "]")))))))
 
 (defun print-fontset (fontset &optional print-opened)
   "Print information about FONTSET.