]> git.eshelyaron.com Git - emacs.git/commitdiff
Configure Symbola font only if installed
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Jun 2015 20:39:57 +0000 (13:39 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Jun 2015 20:40:29 +0000 (13:40 -0700)
* lisp/international/fontset.el (setup-default-fontset):
Don't specify the Symbola font if it's not installed.
Likewise for FreeMono.  (Bug#20727)

lisp/international/fontset.el

index 6fd1b525d6d9d173d37a1e35a64c3f16c25236bc..14f30c15ac3bda7e9ddb75edeb97316c14b16f23 100644 (file)
 
   ;; Special setup for various symbols and some rarely used characters
   ;; covered well by Symbola.
-  (dolist (symbol-subgroup '((#x0250 . #x02AF)   ;; IPA Extensions
-                             (#x2000 . #x206F)   ;; General Punctuation
-                             (#x2070 . #x209F)   ;; Superscripts and Subscripts
-                             (#x20A0 . #x20CF)   ;; Currency Symbols
-                             (#x2100 . #x214F)   ;; Letterlike Symbols
-                             (#x2150 . #x218F)   ;; Number Forms
-                             (#x2190 . #x21FF)   ;; Arrows
-                             (#x2200 . #x22FF)   ;; Mathematical Operators
-                             (#x2300 . #x23FF)   ;; Miscellaneous Technical
-                             (#x2400 . #x243F)   ;; Control Pictures
-                             (#x2440 . #x245F)   ;; Optical Char Recognition
-                             (#x2460 . #x24FF)   ;; Enclosed Alphanumerics
-                             (#x25A0 . #x25FF)   ;; Geometric Shapes
-                             (#x2600 . #x26FF)   ;; Miscellaneous Symbols
-                             (#x2700 . #x27bF)   ;; Dingbats
-                             (#x27C0 . #x27EF)   ;; Misc Mathematical Symbols-A
-                             (#x27F0 . #x27FF)   ;; Supplemental Arrows-A
-                             (#x2900 . #x297F)   ;; Supplemental Arrows-B
-                             (#x2980 . #x29FF)   ;; Misc Mathematical Symbols-B
-                             (#x2A00 . #x2AFF)   ;; Suppl. Math Operators
-                             (#x2B00 . #x2BFF)   ;; Misc Symbols and Arrows
-                             (#x2E00 . #x2E7F)   ;; Supplemental Punctuation
-                             (#x4DC0 . #x4DFF)   ;; Yijing Hexagram Symbols
-                             (#xFE10 . #xFE1F)   ;; Vertical Forms
-                             (#x10100 . #x1013F) ;; Aegean Numbers
-                             (#x102E0 . #x102FF) ;; Coptic Epact Numbers
-                             (#x1D000 . #x1D0FF) ;; Byzanthine Musical Symbols
-                             (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation
-                             (#x1F0A0 . #x1F0FF) ;; Playing Cards
-                             (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl
-                             (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs
-                             (#x1F600 . #x1F64F) ;; Emoticons
-                             (#x1F650 . #x1F67F) ;; Ornamental Dingbats
-                             (#x1F680 . #x1F6FF) ;; Transport and Map Symbols
-                             (#x1F700 . #x1F77F) ;; Alchemical Symbols
-                             (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended
-                             (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C
-    (set-fontset-font "fontset-default" symbol-subgroup "Symbola"))
+  (when (find-font (font-spec :name "Symbola"))
+    (dolist (symbol-subgroup
+            '((#x0250 . #x02AF)        ;; IPA Extensions
+              (#x2000 . #x206F)        ;; General Punctuation
+              (#x2070 . #x209F)        ;; Superscripts and Subscripts
+              (#x20A0 . #x20CF)        ;; Currency Symbols
+              (#x2100 . #x214F)        ;; Letterlike Symbols
+              (#x2150 . #x218F)        ;; Number Forms
+              (#x2190 . #x21FF)        ;; Arrows
+              (#x2200 . #x22FF)        ;; Mathematical Operators
+              (#x2300 . #x23FF)        ;; Miscellaneous Technical
+              (#x2400 . #x243F)        ;; Control Pictures
+              (#x2440 . #x245F)        ;; Optical Char Recognition
+              (#x2460 . #x24FF)        ;; Enclosed Alphanumerics
+              (#x25A0 . #x25FF)        ;; Geometric Shapes
+              (#x2600 . #x26FF)        ;; Miscellaneous Symbols
+              (#x2700 . #x27bF)        ;; Dingbats
+              (#x27C0 . #x27EF)        ;; Misc Mathematical Symbols-A
+              (#x27F0 . #x27FF)        ;; Supplemental Arrows-A
+              (#x2900 . #x297F)        ;; Supplemental Arrows-B
+              (#x2980 . #x29FF)        ;; Misc Mathematical Symbols-B
+              (#x2A00 . #x2AFF)        ;; Suppl. Math Operators
+              (#x2B00 . #x2BFF)        ;; Misc Symbols and Arrows
+              (#x2E00 . #x2E7F)        ;; Supplemental Punctuation
+              (#x4DC0 . #x4DFF)        ;; Yijing Hexagram Symbols
+              (#xFE10 . #xFE1F)        ;; Vertical Forms
+              (#x10100 . #x1013F)      ;; Aegean Numbers
+              (#x102E0 . #x102FF)      ;; Coptic Epact Numbers
+              (#x1D000 . #x1D0FF)      ;; Byzanthine Musical Symbols
+              (#x1D200 . #x1D24F)      ;; Ancient Greek Musical Notation
+              (#x1F0A0 . #x1F0FF)      ;; Playing Cards
+              (#x1F100 . #x1F1FF)      ;; Enclosed Alphanumeric Suppl
+              (#x1F300 . #x1F5FF)      ;; Misc Symbols and Pictographs
+              (#x1F600 . #x1F64F)      ;; Emoticons
+              (#x1F650 . #x1F67F)      ;; Ornamental Dingbats
+              (#x1F680 . #x1F6FF)      ;; Transport and Map Symbols
+              (#x1F700 . #x1F77F)      ;; Alchemical Symbols
+              (#x1F780 . #x1F7FF)      ;; Geometric Shapes Extended
+              (#x1F800 . #x1F8FF)))    ;; Supplemental Arrows-C
+      (set-fontset-font "fontset-default" symbol-subgroup "Symbola")))
   ;; Box Drawing and Block Elements
-  (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono")
+  (when (find-font (font-spec "FreeMono"))
+    (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono"))
 
   ;; Append CJK fonts for characters other than han, kana, cjk-misc.
   ;; Append fonts for scripts whose name is also a charset name.