Windows Subsystem for Linux (WSL) has come a long way—especially under Windows 11. WSL2 now offers smooth integration for Linux graphical applications, making it feel less like a compatibility layer and more like a native experience. But if you're an Emacs user, you might have noticed something off.
Launching Emacs under WSL can feel like stepping into a time machine. Tiny fonts, washed-out visuals, and a UI that evokes the green-and-amber glow of vintage terminals. Functional? Yes. Pleasant? Absolutely not.
But here's the good news: it is easy to make Emacs under WSL2 look just as sharp and modern as it does on Mac OSX.
The emacs-pgtk
build is designed for better graphical integration under WSL. It uses the Pure GTK interface, which plays nicely with WSL’s GUI support.
sudo apt install emacs-pgtk
To make Emacs look great, we’ll use Windows’ rich font library. First, edit your font configuration:
sudo emacs /etc/fonts/fonts.conf
and add the Windows Font directory to the list of font directories:
<dir>/mnt/c/Windows/Fonts</dir>
This tells Ubuntu to include Windows' TrueType fonts in its font cache.
Then we refresh the font cache:
fc-cache -fv
And finally start Emacs, and in the font selection popup, you should see all your favorite Windows fonts. I went with Consolas 14pt, and the transformation was instant. Crisp text, modern aesthetics, and no more squinting.
Comments
Post a Comment