]> git.eshelyaron.com Git - emacs.git/commitdiff
(fontset-plain-name): Handle the case
authorKenichi Handa <handa@m17n.org>
Mon, 13 May 2002 13:01:22 +0000 (13:01 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 13 May 2002 13:01:22 +0000 (13:01 +0000)
that size, weight, slant are not specified in the fontset name.

lisp/international/fontset.el

index 27f80cbed0d44ac748288f88532d846c04d56dda..e60f5c8fd7953b3c06c9c2e5416b009e961b9c4e 100644 (file)
@@ -415,21 +415,23 @@ with \"fontset\" in `<CHARSET_REGISTRY> field."
          (if (not (string-match "^fontset-\\(.*\\)$" nickname))
              fontset
            (setq nickname (match-string 1 nickname))
-           (if (> (string-to-int size) 0)
+           (if (and (integerp size) (> (string-to-int size) 0))
                (setq name (format "%s: %s-dot" nickname size))
              (setq name nickname))
-           (cond ((string-match "^medium$" weight)
-                  (setq name (concat name " " "medium")))
-                 ((string-match "^bold$\\|^demibold$" weight)
-                  (setq name (concat name " " weight))))
-           (cond ((string-match "^i$" slant)
-                  (setq name (concat name " " "italic")))
-                 ((string-match "^o$" slant)
-                  (setq name (concat name " " "slant")))
-                 ((string-match "^ri$" slant)
-                  (setq name (concat name " " "reverse italic")))
-                 ((string-match "^ro$" slant)
-                  (setq name (concat name " " "reverse slant"))))
+           (and weight
+                (cond ((string-match "^medium$" weight)
+                       (setq name (concat name " " "medium")))
+                      ((string-match "^bold$\\|^demibold$" weight)
+                       (setq name (concat name " " weight)))))
+           (and slant
+                (cond ((string-match "^i$" slant)
+                       (setq name (concat name " " "italic")))
+                      ((string-match "^o$" slant)
+                       (setq name (concat name " " "slant")))
+                      ((string-match "^ri$" slant)
+                       (setq name (concat name " " "reverse italic")))
+                      ((string-match "^ro$" slant)
+                       (setq name (concat name " " "reverse slant")))))
            name))
       fontset)))