Skip to content

Commit

Permalink
emacs: org font fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborpilz committed Mar 29, 2024
1 parent 4ebf9c4 commit 72f7aad
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 92 deletions.
27 changes: 14 additions & 13 deletions home/config/doom/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14 :weight 'light)
doom-big-font (font-spec :family "FiraCode Nerd Font" :size 28 :weight 'normal)
doom-unicode-font (font-spec :family "FiraCode Nerd Font" :size 14 :weight 'normal)
doom-variable-pitch-font (font-spec :family "FiraCode Nerd Font" :size 16 :weight 'normal))
doom-variable-pitch-font (font-spec :family "DejaVu Serif" :size 16 :weight 'normal))

(setq display-line-numbers-type 'relative)

Expand All @@ -29,18 +29,18 @@
(setq calendar-week-start-day 1) ;; start on monday
(setq org-agenda-include-diary t)

(let* ((variable-tuple '(:font "Iosevka Slab"))
(headline `(:inherit default :weight black)))
(custom-theme-set-faces 'user
`(org-level-8 ((t (,@headline ,@variable-tuple))))
`(org-level-7 ((t (,@headline ,@variable-tuple))))
`(org-level-6 ((t (,@headline ,@variable-tuple))))
`(org-level-5 ((t (,@headline ,@variable-tuple))))
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.33))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.5))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))
;; (let* ((variable-tuple '(:font "Iosevka Slab"))
;; (headline `(:inherit default :weight black)))
;; (custom-theme-set-faces 'user
;; `(org-level-8 ((t (,@headline ,@variable-tuple))))
;; `(org-level-7 ((t (,@headline ,@variable-tuple))))
;; `(org-level-6 ((t (,@headline ,@variable-tuple))))
;; `(org-level-5 ((t (,@headline ,@variable-tuple))))
;; `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
;; `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
;; `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.33))))
;; `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.5))))
;; `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))

(add-hook 'org-mode-hook #'mixed-pitch-mode)

Expand Down Expand Up @@ -575,6 +575,7 @@ for what debugger to use. If the prefix ARG is set, prompt anyway."
(setq doom-modeline-buffer-encoding nil)
(setq doom-modeline-modal nil)
(setq doom-modeline-column-format "")
(setq size-indication-mode nil)

(use-package! spacious-padding
:config
Expand Down
28 changes: 14 additions & 14 deletions home/config/doom/config.org
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#+PROPERTY: header-args elisp :tangle ./config.el :results silent
#+TITLE: Doom Emacs Config

* Base Settings
** Personal data
Set Name and mail adress
Expand All @@ -14,7 +13,7 @@ Set Name and mail adress
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14 :weight 'light)
doom-big-font (font-spec :family "FiraCode Nerd Font" :size 28 :weight 'normal)
doom-unicode-font (font-spec :family "FiraCode Nerd Font" :size 14 :weight 'normal)
doom-variable-pitch-font (font-spec :family "FiraCode Nerd Font" :size 16 :weight 'normal))
doom-variable-pitch-font (font-spec :family "DejaVu Serif" :size 16 :weight 'normal))
#+end_src

** Line numbers
Expand Down Expand Up @@ -73,18 +72,18 @@ Small utility to add a function to multiple hooks at once.
*** Typography
Change font sizes for diferent headline levels.
#+begin_src elisp
(let* ((variable-tuple '(:font "Iosevka Slab"))
(headline `(:inherit default :weight black)))
(custom-theme-set-faces 'user
`(org-level-8 ((t (,@headline ,@variable-tuple))))
`(org-level-7 ((t (,@headline ,@variable-tuple))))
`(org-level-6 ((t (,@headline ,@variable-tuple))))
`(org-level-5 ((t (,@headline ,@variable-tuple))))
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.33))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.5))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))
;; (let* ((variable-tuple '(:font "Iosevka Slab"))
;; (headline `(:inherit default :weight black)))
;; (custom-theme-set-faces 'user
;; `(org-level-8 ((t (,@headline ,@variable-tuple))))
;; `(org-level-7 ((t (,@headline ,@variable-tuple))))
;; `(org-level-6 ((t (,@headline ,@variable-tuple))))
;; `(org-level-5 ((t (,@headline ,@variable-tuple))))
;; `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
;; `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
;; `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.33))))
;; `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.5))))
;; `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil))))))
#+end_src

# How can I make these headlines white?
Expand Down Expand Up @@ -1442,6 +1441,7 @@ Disable additional unnecessary information
(setq doom-modeline-buffer-encoding nil)
(setq doom-modeline-modal nil)
(setq doom-modeline-column-format "")
(setq size-indication-mode nil)
#+end_src
** UI
*** General Padding
Expand Down
2 changes: 1 addition & 1 deletion home/config/doom/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
hydra
;; indent-guides ; highlighted indent columns
(ligatures +fira +iosevka) ; ligatures and symbols to make your code pretty again
(ligatures +fira) ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions
Expand Down
65 changes: 1 addition & 64 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,71 +18,8 @@ with mylib;
home.packages = with pkgs; [
# TODO: move fonts to own module
(nerdfonts.override { fonts = [ "FiraCode" ]; })
iosevka
(iosevka.override {
set = "custom";
privateBuildPlan = ''
[buildPlans.iosevka-custom]
family = "Iosevka Custom"
spacing = "normal"
serifs = "sans"
noCvSs = true
exportGlyphNames = false
[buildPlans.iosevka-custom.weights.Regular]
shape = 400
menu = 400
css = 400
[buildPlans.iosevka-custom.weights.Medium]
shape = 500
menu = 500
css = 500
'';
})

(iosevka.override {
set = "slab";
privateBuildPlan = ''
[buildPlans.IosekaSlab]
family = "Ioseka Slab"
spacing = "quasi-proportional"
serifs = "slab"
noCvSs = true
exportGlyphNames = false
noLigation = true
[buildPlans.IosekaSlab.variants]
inherits = "ss20"
[buildPlans.IosekaSlab.weights.ExtraLight]
shape = 200
menu = 200
css = 200
[buildPlans.IosekaSlab.weights.Regular]
shape = 400
menu = 400
css = 400
[buildPlans.IosekaSlab.weights.SemiBold]
shape = 600
menu = 600
css = 600
[buildPlans.IosekaSlab.weights.Heavy]
shape = 900
menu = 900
css = 900
[buildPlans.IosekaSlab.widths.Normal]
shape = 500
menu = 5
css = "normal"
'';

})
etBook
dejavu_fonts

# Need later version of bash for nix-shell to work correctly on macos
bash
Expand Down

0 comments on commit 72f7aad

Please sign in to comment.