Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name (opened by): -outline-Fira Code-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
- full name: Fira Code-10.0
- size: 13
- height: 15
- baseline-offset: 0
- relative-compose: 0
- default-ascent: 12
- ascent: 12
- descent: 3
- average-width: 8
- space-width: 8
- max-width: 39
- (defun font-exists-p (font)
- "Comprueba si una tipografĂa existe. Sacado de https://redd.it/1xe7vr"
- (if (not (find-font (font-spec :name font)))
- nil
- t))
- (defun shackra-arregla-emojis (&optional frame)
- "Arregla la visualizacion de los emojis"
- ;; Para NS/Cocoa
- (when (eq system-type 'darwin)
- (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") frame 'prepend))
- ;; Para todos los demas sistemas operativos
- (when (and (font-exists-p "Symbola") (not (eq system-type 'darwin)))
- (set-fontset-font t 'symbol (font-spec :size 20 :name "Symbola") frame 'prepend)))
- (defun shackra-font-set (&optional frame)
- "Establece una tipografia para el nuevo marco creado"
- (cond
- ((font-exists-p "Fira Code") (set-frame-font "Fira Code 10") (add-to-list 'default-frame-alist '(font . "Fira Code-10")))
- ((font-exists-p "Monoisome") (set-frame-font "Monoisome 9") (add-to-list 'default-frame-alist '(font . "Monoisome-9")))
- ((font-exists-p "Monoid") (set-frame-font "Monoid 9") (add-to-list 'default-frame-alist '(font . "Monoid-9")))
- ((font-exists-p "Source Code Pro") (set-frame-font "Source Code Pro 10") (add-to-list 'default-frame-alist '(font . "Source Code Pro-10")))))
- (add-hook 'after-make-frame-functions #'shackra-arregla-emojis)
- (add-hook 'after-make-frame-functions #'shackra-font-set)
- (unless (daemonp)
- (shackra-arregla-emojis (selected-frame))
- (shackra-font-set (selected-frame)))
Add Comment
Please, Sign In to add comment