Use Noto Serif in nov mode

This commit is contained in:
Marcus Kammer 2023-12-27 11:16:32 +01:00
parent 51145d2a76
commit 392cfc594c
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -21,17 +21,18 @@
(use-package nov (use-package nov
:hook ((nov-mode . visual-line-mode) :hook ((nov-mode . visual-line-mode)
(nov-mode . (lambda () (if (eq system-type 'windows-nt) (nov-mode . (lambda () (face-remap-add-relative 'variable-pitch :weight 'normal :height 120 :family "Noto Serif"))))
(setq-local line-spacing 2)
(setq-local line-spacing 4)))))
:mode ("\\.epub\\'" . nov-mode) :mode ("\\.epub\\'" . nov-mode)
:init :init
(add-hook 'nov-mode-hook #'shrface-mode) (add-hook 'nov-mode-hook #'shrface-mode)
:custom :custom
(nov-header-line-format nil) (nov-header-line-format nil)
(nov-text-width 82)
(nov-variable-pitch t)
:config :config
(setq nov-text-width 82 (if (eq system-type 'windows-nt)
nov-variable-pitch t) (setq-local line-spacing 2)
(setq-local line-spacing 4))
(require 'shrface) (require 'shrface)
(setq nov-shr-rendering-functions '((img . nov-render-img) (title . nov-render-title))) (setq nov-shr-rendering-functions '((img . nov-render-img) (title . nov-render-title)))
(setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))) (setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions)))