Not using Cygwin
.
Problem
The default fonts that come with WSL/Ubuntu do not work well with emacs - not suitable for long-time editing (at least for me).
There are several particular issues. The first one is with the defects with the default font DejaVu Sans Mono
(This is probably personal). The second is the scale of the fonts. Finally, the anti-aliasing of the fonts is missing.
It seems that anti-aliasing is not supported with Xming. So this article will focus on solving the first two issues.
Solving the scaling issue
This problem is relatively easy. One way is to set the fontsize particularly in emacs. Another way, which I went with, is to set directly through Xming. This is simple: just add one more argument to the shortcut to the Xming executable.
Solving font issue
The list of fonts that are available to emacs can be found by,
The fonts can be tried out by,
However, none of them works for me. The font that worked well for me is ubuntu mono
, which can be downloaded from here.
Next, installing fonts in Xming is pretty straightforward, as shown here. It would require the mkfontscale
tool, which is available in the xfonts-utils
from apt
. Note that mkfontscale is also available in Cygwin, but I do not think it is necessary to install a heavy system like Cygwin just for installing the font.
Finally, the new font in emacs is set by