summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-06-08 08:42:05 -0700
committerFranck Cuny <franck@fcuny.net>2023-06-08 08:43:37 -0700
commit00b931ecffd451b2dcf1dd3c29e252101b73e851 (patch)
tree20709e0d9b4bfe01bb37087583b1a304cecbff39
parentmore feeds (diff)
downloademacs.d-00b931ecffd451b2dcf1dd3c29e252101b73e851.tar.gz
configure the font family and the size
Set source code pro for monospace and dejavu for variable pitch face.

The font size needs to be of a higher height on MacOS than Linux.

Change-Id: I7f99f74e93166e3967fa351864fa75bc2053d141
Diffstat (limited to '')
-rw-r--r--init.org18
1 files changed, 12 insertions, 6 deletions
diff --git a/init.org b/init.org
index 09550bc..043a105 100644
--- a/init.org
+++ b/init.org
@@ -874,17 +874,23 @@ Invokes [[https://direnv.net/][direnv]] to obtain environment for the current fi
 Somehow I need to set the font to a higher height on MacOS.
 
 #+BEGIN_SRC emacs-lisp
+(defun my/default-font-size()
+  "Set the size of the font based on the operating system."
+  (if (memq window-system '(mac ns))
+      150
+    130))
+
 (set-face-attribute 'default nil
-                    :family "JetBrains Mono"
-                    :height 130)
+                    :family "Source Code Pro"
+                    :height (my/default-font-size))
 
 (set-face-attribute 'fixed-pitch nil
-                    :family "JetBrain Mono"
-                    :height 130)
+                    :family "Source Code Pro"
+                    :height (my/default-font-size))
 
 (set-face-attribute 'variable-pitch nil
-                    :family "Roboto"
-                    :height 130)
+                    :family "DejaVu Sans"
+                    :height (my/default-font-size))
 #+END_SRC
 
 ** fringe