Skip to content
Snippets Groups Projects
Commit 5d38fe78 authored by Liu Miao's avatar Liu Miao
Browse files

Config with font set

parent bd0c626d
No related branches found
No related tags found
No related merge requests found
...@@ -47,9 +47,6 @@ ...@@ -47,9 +47,6 @@
(set-keyboard-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)
(set-default-coding-systems 'utf-8) (set-default-coding-systems 'utf-8)
;; Set font
(set-frame-font "Source Code Pro 11" t t)
(add-hook 'prog-mode-hook (lambda () (setq truncate-lines t))) (add-hook 'prog-mode-hook (lambda () (setq truncate-lines t)))
;;; Packages ;;; Packages
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
;;; Commentary: ;;; Commentary:
;;; Code: ;;; Code:
(defvar user/default-font '("Consolas"
:size 10
:weight normal
:width normal))
(defvar user/userconfig-file (defvar user/userconfig-file
(expand-file-name "cache/userconfig" user-emacs-directory)) (expand-file-name "cache/userconfig" user-emacs-directory))
......
...@@ -75,6 +75,12 @@ ...@@ -75,6 +75,12 @@
(when (bound-and-true-p tooltip-mode) (when (bound-and-true-p tooltip-mode)
(tooltip-mode -1)) (tooltip-mode -1))
;; Font set
(when (find-font (font-spec :name (car user/default-font)))
(let* ((font (car user/default-font))
(props (cdr user/default-font))
(fontspec (apply 'font-spec :name font props)))
(set-frame-font fontspec nil t)))
;;; Keybinding ;;; Keybinding
(use-package evil (use-package evil
......
...@@ -11,5 +11,11 @@ ...@@ -11,5 +11,11 @@
user/package-mirror emacs-china-package-mirror user/package-mirror emacs-china-package-mirror
;; user/lsp-client ;; user/lsp-client
;; font
;; user/default-font '("Source Code Pro"
;; :size 15
;; :weight normal
;; :width normal)
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment