aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2001-02-24 02:42:48 +0000
committerKenichi Handa2001-02-24 02:42:48 +0000
commit6bf84cdec5ef178d6005efe96a9e71f7642d4487 (patch)
tree1c2d62db53060e4d21e29b166cbe4a92f3652882
parent119171dd3df9afdcad649430b4073701abb18532 (diff)
downloademacs-6bf84cdec5ef178d6005efe96a9e71f7642d4487.tar.gz
emacs-6bf84cdec5ef178d6005efe96a9e71f7642d4487.zip
(x-complement-fontset-spec): In the
case that we use ASCII font for the other charsets, use only family and regisry part of it.
-rw-r--r--lisp/international/fontset.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index f2c42208ac7..d0f3de09a64 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -315,7 +315,8 @@ FONTLIST.
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* ((slot (assq 'ascii fontlist)) 317 (let* ((slot (assq 'ascii fontlist))
318 (ascii-font (cdr slot))) 318 (ascii-font (cdr slot))
319 ascii-font-spec)
319 (if ascii-font 320 (if ascii-font
320 (setcdr slot (setq ascii-font (x-resolve-font-name ascii-font))) 321 (setcdr slot (setq ascii-font (x-resolve-font-name ascii-font)))
321 ;; If font for ASCII is not specified, add it. 322 ;; If font for ASCII is not specified, add it.
@@ -326,6 +327,16 @@ variable `x-font-name-charset-alist'), add that information to FONTLIST."
326 327
327 ;; If the font for ASCII also supports the other charsets, and 328 ;; If the font for ASCII also supports the other charsets, and
328 ;; they are not specified in FONTLIST, add them. 329 ;; they are not specified in FONTLIST, add them.
330 (setq xlfd-fields (x-decompose-font-name ascii-font))
331 (if (not xlfd-fields)
332 (setq ascii-font-spec ascii-font)
333 (setq ascii-font-spec
334 (cons (format "%s-%s"
335 (aref xlfd-fields xlfd-regexp-foundry-subnum)
336 (aref xlfd-fields xlfd-regexp-family-subnum))
337 (format "%s-%s"
338 (aref xlfd-fields xlfd-regexp-registry-subnum)
339 (aref xlfd-fields xlfd-regexp-encoding-subnum)))))
329 (let ((tail x-font-name-charset-alist) 340 (let ((tail x-font-name-charset-alist)
330 elt) 341 elt)
331 (while tail 342 (while tail
@@ -337,7 +348,7 @@ variable `x-font-name-charset-alist'), add that information to FONTLIST."
337 (setq charset (car charsets) charsets (cdr charsets)) 348 (setq charset (car charsets) charsets (cdr charsets))
338 (or (assq charset fontlist) 349 (or (assq charset fontlist)
339 (setq fontlist 350 (setq fontlist
340 (cons (cons charset ascii-font) fontlist)))))))) 351 (cons (cons charset ascii-font-spec) fontlist))))))))
341 352
342 fontlist)) 353 fontlist))
343 354