You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you @martinescardo for creating these notes and making them available. One aspect of these notes that I found attractive was being able to follow along in Agda. This is easier if Emacs is using a font which can render all (or most) of the characters used in the notes. It took me some time to find some candidate fonts and I thought I would document my experience below. The goal of this "issue" is to share what I found as a novice Emacs user on Windows 10.
Summary: JuliaMono seems like a nice choice. There may be other choices (such as DejaVu Mono; however on its own it seems to be missing some characters, so it may require a fallback font.)
{- Unicode: lambda = λ, BB "B" = 𝔹 -}{-# OPTIONS --without-K --exact-split --safe --auto-inline #-}moduleHoTT-UF-Agdawherevariable𝓤 𝓥 𝓦 𝓣 : Universe
data𝟙: 𝓤₀ ̇ where⋆ : 𝟙
𝟙-induction : (A : 𝟙 → 𝓤 ̇ ) → A ⋆ → (x : 𝟙) → A x
𝟙-induction A a ⋆ = a
data𝟘: 𝓤₀ ̇ wheredataℕ: 𝓤₀ ̇ wherezero : ℕ
succ : ℕ → ℕ
Default
Before setting a font this is what an example file looks like:
Consolas
I believe the default font used by Chrome for fixed-width text on my machine is Consolas, so I tried it in Emacs by using Options -> Set Default Font. (For all fonts below that's how I will test them.) It looks like:
DejaVu Sans Mono
Better looking blackboard bold "N" but lots of missing characters.
DejaVu Math TeX Gyre
Has all characters but does not seem to be a monospace font:
Lucida Bright
Has all characters but does not seem monospaced:
I also tried Lucida Console but many characters were missing.
Monokai
Missing lots of characters:
JuliaMono
Has all characters and is monospaced:
Above was 10pt; perhaps looks better at 12pt:
Conclusion
JuliaMono seemed to work best. I added the following to my .emacs (based on Fonts in Emacs):
Mirroring the config of @martinescardo, I downloaded Symbola, installed Symbola_hint.ttf and added the following to my .emacs (on my Windows machine the sizes matched better if I omitted any :size).
(set-fontset-font"fontset-default"nil (font-spec:name"DejaVu Sans Mono"))
(set-fontset-fonttnil (font-spec:name"Symbola"))
It looks like
which I think is nicer looking than JuliaMono. I think I would recommend this config over my original one.
My current config is:
;; See https://agda.readthedocs.io/en/latest/getting-started/installation.html#step-3-running-the-agda-mode-program
(load-file (let ((coding-system-for-read'utf-8))
(shell-command-to-string"agda-mode locate")))
;; based on https://idiocy.org/emacs-fonts-and-fontsets.html
(set-face-attribute'defaultnil:font"DejaVu Sans Mono")
(set-fontset-fonttnil"Symbola"nil'append)
(set-face-attribute'defaultnil:height120)
Thank you @martinescardo for creating these notes and making them available. One aspect of these notes that I found attractive was being able to follow along in Agda. This is easier if Emacs is using a font which can render all (or most) of the characters used in the notes. It took me some time to find some candidate fonts and I thought I would document my experience below. The goal of this "issue" is to share what I found as a novice Emacs user on Windows 10.
Summary: JuliaMono seems like a nice choice. There may be other choices (such as DejaVu Mono; however on its own it seems to be missing some characters, so it may require a fallback font.)
I'm using running a stock GNU Emacs 29.1 and my
.emacs
file consists of code to loadagda-mode
.The example Agda file is
Default
Before setting a font this is what an example file looks like:
Consolas
I believe the default font used by Chrome for fixed-width text on my machine is Consolas, so I tried it in Emacs by using Options -> Set Default Font. (For all fonts below that's how I will test them.) It looks like:
DejaVu Sans Mono
Better looking blackboard bold "N" but lots of missing characters.
DejaVu Math TeX Gyre
Has all characters but does not seem to be a monospace font:
Lucida Bright
Has all characters but does not seem monospaced:
I also tried Lucida Console but many characters were missing.
Monokai
Missing lots of characters:
JuliaMono
Has all characters and is monospaced:
Above was 10pt; perhaps looks better at 12pt:
Conclusion
JuliaMono seemed to work best. I added the following to my
.emacs
(based on Fonts in Emacs):Questions
I would be interested in answers to the following questions:
The text was updated successfully, but these errors were encountered: