comparison lisp/international/fontset.el @ 89325:58d5f88f985b

(x-complement-fontset-spec): If a fontname doesn't conform to XLFD format, try to get XLFD name by x-list-fonts.
author Kenichi Handa <handa@m17n.org>
date Mon, 06 Jan 2003 01:12:14 +0000
parents 865b111141b6
children 8f8c7d4c2e6e
comparison
equal deleted inserted replaced
89324:7f05ba2b8954 89325:58d5f88f985b
550 (setq fontlist (cons (list 'ascii ascii-font) fontlist))) 550 (setq fontlist (cons (list 'ascii ascii-font) fontlist)))
551 551
552 (dolist (elt fontlist) 552 (dolist (elt fontlist)
553 (let ((name (cadr elt)) 553 (let ((name (cadr elt))
554 font-spec) 554 font-spec)
555 (when (string-match xlfd-style-regexp name) 555 (when (or (string-match xlfd-style-regexp name)
556 (and (setq name (car (x-list-fonts name nil nil 1)))
557 (string-match xlfd-style-regexp name)))
556 (setq font-spec (make-vector 6 nil)) 558 (setq font-spec (make-vector 6 nil))
557 (dotimes (i 6) 559 (dotimes (i 6)
558 (aset font-spec i (match-string (1+ i) name))) 560 (aset font-spec i (match-string (1+ i) name)))
559 (dotimes (i 6) 561 (dotimes (i 6)
560 (if (string-match "^[*-]+$" (aref font-spec i)) 562 (if (string-match "^[*-]+$" (aref font-spec i))