]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-complement-fontset-spec): In the
authorKenichi Handa <handa@m17n.org>
Sat, 24 Feb 2001 02:42:48 +0000 (02:42 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 24 Feb 2001 02:42:48 +0000 (02:42 +0000)
case that we use ASCII font for the other charsets, use only
family and regisry part of it.

lisp/international/fontset.el

index f2c42208ac7fede1a2219261264c0e97dac5c708..d0f3de09a64dd91c6eda10e47e01ff18941421e1 100644 (file)
@@ -315,7 +315,8 @@ FONTLIST.
 If a font specifid for ASCII supports the other charsets (see the
 variable `x-font-name-charset-alist'), add that information to FONTLIST."
   (let* ((slot (assq 'ascii fontlist))
-        (ascii-font (cdr slot)))
+        (ascii-font (cdr slot))
+        ascii-font-spec)
     (if ascii-font
        (setcdr slot (setq ascii-font (x-resolve-font-name ascii-font)))
       ;; If font for ASCII is not specified, add it.
@@ -326,6 +327,16 @@ variable `x-font-name-charset-alist'), add that information to FONTLIST."
 
     ;; If the font for ASCII also supports the other charsets, and
     ;; they are not specified in FONTLIST, add them.
+    (setq xlfd-fields (x-decompose-font-name ascii-font))
+    (if (not xlfd-fields)
+       (setq ascii-font-spec ascii-font)
+      (setq ascii-font-spec
+           (cons (format "%s-%s"
+                         (aref xlfd-fields xlfd-regexp-foundry-subnum)
+                         (aref xlfd-fields xlfd-regexp-family-subnum))
+                 (format "%s-%s"
+                         (aref xlfd-fields xlfd-regexp-registry-subnum)
+                         (aref xlfd-fields xlfd-regexp-encoding-subnum)))))
     (let ((tail x-font-name-charset-alist)
          elt)
       (while tail
@@ -337,7 +348,7 @@ variable `x-font-name-charset-alist'), add that information to FONTLIST."
                (setq charset (car charsets) charsets (cdr charsets))
                (or (assq charset fontlist)
                    (setq fontlist
-                         (cons (cons charset ascii-font) fontlist))))))))
+                         (cons (cons charset ascii-font-spec) fontlist))))))))
     
     fontlist))