emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 203e84c: Configure Symbola font only if installed


From: Paul Eggert
Subject: [Emacs-diffs] master 203e84c: Configure Symbola font only if installed
Date: Fri, 12 Jun 2015 20:40:42 +0000

branch: master
commit 203e84c6cf9b8356e376cc748b5ed331df96dc9e
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Configure Symbola font only if installed
    
    * 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 |   81 +++++++++++++++++++++--------------------
 1 files changed, 42 insertions(+), 39 deletions(-)

diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 6fd1b525..14f30c1 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -695,46 +695,49 @@
 
   ;; 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]