Guest User

Untitled

a guest
Feb 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. name (opened by): -outline-Fira Code-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
  2. full name: Fira Code-10.0
  3. size: 13
  4. height: 15
  5. baseline-offset: 0
  6. relative-compose: 0
  7. default-ascent: 12
  8. ascent: 12
  9. descent: 3
  10. average-width: 8
  11. space-width: 8
  12. max-width: 39
  13.  
  14. (defun font-exists-p (font)
  15. "Comprueba si una tipografĂ­a existe. Sacado de https://redd.it/1xe7vr"
  16. (if (not (find-font (font-spec :name font)))
  17. nil
  18. t))
  19.  
  20. (defun shackra-arregla-emojis (&optional frame)
  21. "Arregla la visualizacion de los emojis"
  22. ;; Para NS/Cocoa
  23. (when (eq system-type 'darwin)
  24. (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") frame 'prepend))
  25. ;; Para todos los demas sistemas operativos
  26. (when (and (font-exists-p "Symbola") (not (eq system-type 'darwin)))
  27. (set-fontset-font t 'symbol (font-spec :size 20 :name "Symbola") frame 'prepend)))
  28.  
  29. (defun shackra-font-set (&optional frame)
  30. "Establece una tipografia para el nuevo marco creado"
  31. (cond
  32. ((font-exists-p "Fira Code") (set-frame-font "Fira Code 10") (add-to-list 'default-frame-alist '(font . "Fira Code-10")))
  33. ((font-exists-p "Monoisome") (set-frame-font "Monoisome 9") (add-to-list 'default-frame-alist '(font . "Monoisome-9")))
  34. ((font-exists-p "Monoid") (set-frame-font "Monoid 9") (add-to-list 'default-frame-alist '(font . "Monoid-9")))
  35. ((font-exists-p "Source Code Pro") (set-frame-font "Source Code Pro 10") (add-to-list 'default-frame-alist '(font . "Source Code Pro-10")))))
  36.  
  37. (add-hook 'after-make-frame-functions #'shackra-arregla-emojis)
  38. (add-hook 'after-make-frame-functions #'shackra-font-set)
  39.  
  40. (unless (daemonp)
  41. (shackra-arregla-emojis (selected-frame))
  42. (shackra-font-set (selected-frame)))
Add Comment
Please, Sign In to add comment