I like to have my beloved Emacs setup on different machines. For Debian-based machines, I have this little script that helps to create the environment I need.
Sometimes, it's not that easy. Although most of the external dependencies I need are somewhere in the Linux world, fonts are a different matter. To avoid pain of any kind enter dynamic-fonts.
Some Elisp speaks a thousand words:dynamic-fonts.el makes font configuration more portable between machines. When Emacs is starting up, dynamic-fonts chooses fonts for your basic faces based on which fonts are actually available on your system.
You may set a list of fonts in order of preference using customize.
Code: Select all
(use-package dynamic-fonts ; Select best available font
:ensure t
:config (progn
(setq dynamic-fonts-preferred-monospace-fonts
'("Source Code Pro"
"DejaVu Sans Mono")
dynamic-fonts-preferred-monospace-point-size 13
dynamic-fonts-preferred-proportional-fonts
'("Fira Sans Book"
"DejaVu Sans Book")
dynamic-fonts-preferred-proportional-point-size 13)
(dynamic-fonts-setup)))