commit b1787eb272b1dab182b0ae97d90fcc5a6525aed0
parent 79e9266d00296b712ae75603dec86774386e19c1
Author: Ethan Long <me@ethandl.dev>
Date: Fri, 19 Jun 2026 13:58:06 +1000
"Fixed" a font rendering bug on Linux. Fixed daemon frame init.
On my work PC linux install, sizes of CMU typewriter below 155 are
broken for some reason? Unclear why... Anyway the "fix" is to just
make it have a height of 155. I will figure this out later.
The other problem was that for emacs in daemon mode, new daemon
frames actually use a different frame hook called
`server-after-make-frame-hook`.
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/config.org b/config.org
@@ -235,10 +235,11 @@ As a fallback, I don't mind Monaco/Monego.
all open frames. If NAME or SIZE are nil, follows the same
convention as `ethandl/set-mono-font-vars'."
(ethandl/set-mono-font-vars name size)
- (set-frame-font ethandl/mono-font-string t (if (bound-and-true-p frame) (list frame) t)))
+ (set-frame-font ethandl/mono-font-string t (if frame (list frame) t)))
- (ethandl/set-frame-mono-font (selected-frame) "Codelia Ligatures" 12)
+ (ethandl/set-frame-mono-font)
(add-hook 'after-make-frame-functions #'ethandl/set-frame-mono-font)
+ (add-hook 'server-after-make-frame-hook #'ethandl/set-frame-mono-font)
#+end_src
*** Org fonts
Org documents are configured to start in variable pitch mode such that we have two sets of fonts: Body (variable-pitch), and verbatim (monospaced fixed-pitch):
@@ -253,7 +254,7 @@ To define our desired fonts, we create functions as we did before in [[Code font
Use HEIGHT to specify the font height in px, VAR as the variable-pitch
font family, and MONO as the monospace font family. If HEIGHT is nil,
- uses a height of 140. If VAR or MONO are nil, selects the first
+ uses a height of 155. If VAR or MONO are nil, selects the first
available font for each from a predefined list."
(setq ethandl/org-mono-font-name
(or mono
@@ -273,7 +274,7 @@ To define our desired fonts, we create functions as we did before in [[Code font
"Times New Roman"
"DejaVu Serif"))))
(setq ethandl/org-font-ht
- (if (bound-and-true-p height) height 140)))
+ (or height 155)))
#+end_src
Next, we define a way to easily apply these fonts.