comparison 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
comparison
equal deleted inserted replaced
91514:3bae857e4116 91515:2ebe99b97e12
874 (insert (format " (#x%02X .. #x%02X)" from to)) 874 (insert (format " (#x%02X .. #x%02X)" from to))
875 (insert (format " (#x%02X)" from)))) 875 (insert (format " (#x%02X)" from))))
876 876
877 ;; Insert a requested font name. 877 ;; Insert a requested font name.
878 (dolist (elt val) 878 (dolist (elt val)
879 (let ((requested (car elt))) 879 (if (not elt)
880 (if (stringp requested) 880 (insert "\n -- inhibit fallback fonts --")
881 (insert "\n " requested) 881 (let ((requested (car elt)))
882 (let (family registry weight slant width adstyle) 882 (if (stringp requested)
883 (if (and (fboundp 'fontp) (fontp requested)) 883 (insert "\n " requested)
884 (setq family (font-get requested :family) 884 (let (family registry weight slant width adstyle)
885 registry (font-get requested :registry) 885 (if (and (fboundp 'fontp) (fontp requested))
886 weight (font-get requested :weight) 886 (setq family (font-get requested :family)
887 slant (font-get requested :slant) 887 registry (font-get requested :registry)
888 width (font-get requested :width) 888 weight (font-get requested :weight)
889 adstyle (font-get requested :adstyle)) 889 slant (font-get requested :slant)
890 (setq family (aref requested 0) 890 width (font-get requested :width)
891 registry (aref requested 5) 891 adstyle (font-get requested :adstyle))
892 weight (aref requested 1) 892 (setq family (aref requested 0)
893 slant (aref requested 2) 893 registry (aref requested 5)
894 width (aref requested 3) 894 weight (aref requested 1)
895 adstyle (aref requested 4))) 895 slant (aref requested 2)
896 (if (not family) 896 width (aref requested 3)
897 (setq family "*-*") 897 adstyle (aref requested 4)))
898 (if (symbolp family) 898 (if (not family)
899 (setq family (symbol-name family))) 899 (setq family "*-*")
900 (or (string-match "-" family) 900 (if (symbolp family)
901 (setq family (concat "*-" family)))) 901 (setq family (symbol-name family)))
902 (if (not registry) 902 (or (string-match "-" family)
903 (setq registry "*-*") 903 (setq family (concat "*-" family))))
904 (if (symbolp registry) 904 (if (not registry)
905 (setq registry (symbol-name registry))) 905 (setq registry "*-*")
906 (or (string-match "-" registry) 906 (if (symbolp registry)
907 (= (aref registry (1- (length registry))) ?*) 907 (setq registry (symbol-name registry)))
908 (setq registry (concat registry "*")))) 908 (or (string-match "-" registry)
909 (insert (format"\n -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s" 909 (= (aref registry (1- (length registry))) ?*)
910 family (or weight "*") (or slant "*") (or width "*") 910 (setq registry (concat registry "*"))))
911 (or adstyle "*") registry))))) 911 (insert (format"\n -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s"
912 912 family (or weight "*") (or slant "*") (or width "*")
913 ;; Insert opened font names (if any). 913 (or adstyle "*") registry)))))
914 (if (and (boundp 'print-opened) (symbol-value 'print-opened)) 914
915 (dolist (opened (cdr elt)) 915 ;; Insert opened font names (if any).
916 (insert "\n\t[" opened "]")))))) 916 (if (and (boundp 'print-opened) (symbol-value 'print-opened))
917 (dolist (opened (cdr elt))
918 (insert "\n\t[" opened "]")))))))
917 919
918 (defun print-fontset (fontset &optional print-opened) 920 (defun print-fontset (fontset &optional print-opened)
919 "Print information about FONTSET. 921 "Print information about FONTSET.
920 If FONTSET is nil, print information about the default fontset. 922 If FONTSET is nil, print information about the default fontset.
921 If optional arg PRINT-OPENED is non-nil, also print names of all opened 923 If optional arg PRINT-OPENED is non-nil, also print names of all opened