aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Willemse2016-02-26 20:15:36 +0100
committerTom Willemse2016-02-26 20:15:36 +0100
commitd5e3b538c1c08843966c4e54fa9781fb58730b19 (patch)
treeebf7c1efb784aa71401e24240feef934ca56835c
parentabcc98639692a251d00ba665a9a938c7ffff8792 (diff)
parentb9702ec376bb53e990f52a7cdf052293710941b5 (diff)
downloadmode-icons-d5e3b538c1c08843966c4e54fa9781fb58730b19.tar.gz
mode-icons-d5e3b538c1c08843966c4e54fa9781fb58730b19.zip
Merge remote-tracking branch 'mattfidler/font-exists'
-rw-r--r--README.org5
-rw-r--r--mode-icons.el12
2 files changed, 11 insertions, 6 deletions
diff --git a/README.org b/README.org
index cc3c619..f1e903c 100644
--- a/README.org
+++ b/README.org
@@ -36,11 +36,10 @@ Some of the modes that have icons instead of names now:
- [[http://fontawesome.io/][Font Awesome]]
- [[https://octicons.github.com/][GitHub Octicons]]
- [[http://fizzed.com/oss/font-mfizz][Font Mfizz]]
+ - [[https://icomoon.io/#icons-icomoon][IcoMoon]]
You need to have installed these on your system in order to use
- these fonts, mode-icons will not do this for you. If you don't have
- them installed you may get some strange glyphs in your mode-line
- instead.
+ these fonts, mode-icons will not do this for you.
* Installation
diff --git a/mode-icons.el b/mode-icons.el
index 9241e99..5f8b443 100644
--- a/mode-icons.el
+++ b/mode-icons.el
@@ -58,6 +58,7 @@
;; - Font Awesome, found at URL `http://fontawesome.io/'.
;; - GitHub Octicons, found at URL `https://octicons.github.com/'.
;; - Font Mfizz, found at URL `http://fizzed.com/oss/font-mfizz'.
+;; - IcoMoon, found at URL `https://icomoon.io/#icons-icomoon'.
;;
;; You should have these installed if you want to use these icons,
;; otherwise you may get strange glyphs in your mode-line instead of
@@ -128,13 +129,14 @@ This was stole/modified from `c-save-buffer-state'"
"Define FONT for `mode-icons'."
`(progn
(defvar ,(intern (format "mode-icons-font-spec-%s" font))
- (font-spec :name ,(format "%s" font)))
+ (and (member ,(format "%s" font) (font-family-list)) (font-spec :name ,(format "%s" font))))
(defvar ,(intern (format "mode-icons-font-%s" font))
- (find-font ,(intern (format "mode-icons-font-spec-%s" font))))))
+ (and (member ,(format "%s" font) (font-family-list)) (find-font ,(intern (format "mode-icons-font-spec-%s" font)))))))
(mode-icons-define-font "github-octicons")
(mode-icons-define-font "font-mfizz")
(mode-icons-define-font "FontAwesome")
+(mode-icons-define-font "IcoMoon-Free")
(defcustom mode-icons
`(("CSS" "css" xpm)
@@ -210,7 +212,10 @@ This was stole/modified from `c-save-buffer-state'"
(apple #xf179 FontAwesome)
(win #xf17a FontAwesome)
;; FIXME: use lsb_release to determine Linux variant and choose appropriate icon
- (unix #xf166 font-mfizz) ;; Use ubuntu, since I think it is the most common.
+ (unix #xeabd IcoMoon-Free) ;; Clear Tux (Unlike FontAwesome)
+ ;; This icon is clearer than FontAwesome's Linux Penguin
+ (unix #xf166 font-mfizz) ;; Use ubuntu, since I think it is the most common.
+ (unix #xf17c FontAwesome) ;; Fall Back to FontAwesome
(undecided #xf128 FontAwesome)
("Text\\'" #xf0f6 FontAwesome)
("\\` ?company\\'" #xf1ad FontAwesome)
@@ -242,6 +247,7 @@ without the extension. And the third being the type of icon."
(const :tag "Octicons" github-octicons)
(const :tag "Fizzed" font-mfizz)
(const :tag "Font Awesome" FontAwesome)
+ (const :tag "Ico Moon Free" IcoMoon-Free)
(const :tag "png" png)
(const :tag "gif" gif)
(const :tag "jpeg" jpeg)