add dynamic fonts.

This commit is contained in:
Ivan Malison 2014-12-10 08:41:13 -08:00
parent fc2ef6ce42
commit b14d826809

View File

@ -1374,6 +1374,51 @@ The current directory is assumed to be the project's root otherwise."
(read-only-mode)) (read-only-mode))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer) (add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(use-package dynamic-fonts
:ensure t
:commands (dynamic-fonts-setup)
:init
(progn
(setq
dynamic-fonts-preferred-monospace-fonts
'("PragmataPro" "Consolas" "Monaco" "Menlo" "DejaVu Sans Mono"
"Droid Sans Mono Pro" "Droid Sans Mono" "Inconsolata" "Source Code Pro"
"Lucida Console" "Envy Code R" "Andale Mono" "Lucida Sans Typewriter"
"Lucida Typewriter" "Panic Sans" "Bitstream Vera Sans Mono"
"Excalibur Monospace" "Courier New" "Courier" "Cousine" "Lekton"
"Ubuntu Mono" "Liberation Mono" "BPmono" "Anonymous Pro"
"ProFontWindows")
dynamic-fonts-preferred-monospace-point-size 11
dynamic-fonts-preferred-proportional-fonts
'("PT Sans" "Lucida Grande" "Segoe UI" "DejaVu Sans" "Bitstream Vera"
"Tahoma" "Verdana" "Helvetica" "Arial Unicode MS" "Arial")
dynamic-fonts-preferred-proportional-point-size 11)
(defvar my-monospaced-font "PragmataPro-11.8")
(defvar my-variable-pitch-font "Pt Sans-13")
;; (defvar my-variable-pitch-font "Input Sans Compressed-11.8")
;; (defvar my-monospaced-font "Input Mono Compressed-11.8")
(when (s-starts-with? "fogskum" system-name)
(setq my-monospaced-font "PragmataPro-13"
my-variable-pitch-font "Pt Sans-13"))
(defun my-set-fonts ()
(interactive)
(when window-system
(condition-case nil
(progn
(set-face-attribute 'default nil :font my-monospaced-font)
;; (set-face-attribute 'default nil :font my-monospaced-font :width 'ultra-condensed :weight 'normal )
(set-face-attribute 'fixed-pitch nil :font my-monospaced-font)
(set-face-attribute 'variable-pitch nil :font my-variable-pitch-font))
(error
(progn
(message
"Setting default fonts failed, running dynamic-fonts-setup...")
(dynamic-fonts-setup))))))
(add-hook 'after-init-hook 'my-set-fonts t)))
;; ============================================================================= ;; =============================================================================
;; Themes ;; Themes
;; ============================================================================= ;; =============================================================================