aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-12-29 06:14:42 +0000
committerKenichi Handa2000-12-29 06:14:42 +0000
commitf6cab6c82f2f59fce01954cfacd1822ec7573fdc (patch)
tree3f2c2d0746f93b866e85894a45c1affc08f0d3ac
parent2b3f28a4d0799e04669b3cbf1da0fb7c40182fe5 (diff)
downloademacs-f6cab6c82f2f59fce01954cfacd1822ec7573fdc.tar.gz
emacs-f6cab6c82f2f59fce01954cfacd1822ec7573fdc.zip
(x-complement-fontset-spec): Resolve
ASCII font name so that the same family name is used for fonts registered in x-font-name-charset-alist. (create-fontset-from-fontset-spec): Adjusted for the above change. The name of fontset alias should be a unresolved ASCII font name.
-rw-r--r--lisp/international/fontset.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index fe3d56d21db..f2c42208ac7 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -314,13 +314,14 @@ FONTLIST.
314 314
315If a font specifid for ASCII supports the other charsets (see the 315If a font specifid for ASCII supports the other charsets (see the
316variable `x-font-name-charset-alist'), add that information to FONTLIST." 316variable `x-font-name-charset-alist'), add that information to FONTLIST."
317 (let ((ascii-font (cdr (assq 'ascii fontlist)))) 317 (let* ((slot (assq 'ascii fontlist))
318 318 (ascii-font (cdr slot)))
319 ;; If font for ASCII is not specified, add it. 319 (if ascii-font
320 (unless ascii-font 320 (setcdr slot (setq ascii-font (x-resolve-font-name ascii-font)))
321 ;; If font for ASCII is not specified, add it.
321 (aset xlfd-fields xlfd-regexp-registry-subnum "iso8859") 322 (aset xlfd-fields xlfd-regexp-registry-subnum "iso8859")
322 (aset xlfd-fields xlfd-regexp-encoding-subnum "1") 323 (aset xlfd-fields xlfd-regexp-encoding-subnum "1")
323 (setq ascii-font (x-compose-font-name xlfd-fields)) 324 (setq ascii-font (x-resolve-font-name (x-compose-font-name xlfd-fields)))
324 (setq fontlist (cons (cons 'ascii ascii-font) fontlist))) 325 (setq fontlist (cons (cons 'ascii ascii-font) fontlist)))
325 326
326 ;; If the font for ASCII also supports the other charsets, and 327 ;; If the font for ASCII also supports the other charsets, and
@@ -428,6 +429,7 @@ It returns a name of the created fontset."
428 (if (charsetp charset) 429 (if (charsetp charset)
429 (setq fontlist (cons (cons charset (match-string 2 fontset-spec)) 430 (setq fontlist (cons (cons charset (match-string 2 fontset-spec))
430 fontlist)))) 431 fontlist))))
432 (setq ascii-font (cdr (assq 'ascii fontlist)))
431 433
432 ;; Complement FONTLIST. 434 ;; Complement FONTLIST.
433 (setq fontlist (x-complement-fontset-spec xlfd-fields fontlist)) 435 (setq fontlist (x-complement-fontset-spec xlfd-fields fontlist))
@@ -443,7 +445,8 @@ It returns a name of the created fontset."
443 (cons (cons name alias) fontset-alias-alist))))) 445 (cons (cons name alias) fontset-alias-alist)))))
444 446
445 ;; Define the ASCII font name alias. 447 ;; Define the ASCII font name alias.
446 (setq ascii-font (cdr (assq 'ascii fontlist))) 448 (or ascii-font
449 (setq ascii-font (cdr (assq 'ascii fontlist))))
447 (or (rassoc ascii-font fontset-alias-alist) 450 (or (rassoc ascii-font fontset-alias-alist)
448 (setq fontset-alias-alist 451 (setq fontset-alias-alist
449 (cons (cons name ascii-font) 452 (cons (cons name ascii-font)