Just run the native Windows binary of Emacs. It uses the native Windows font rendering APIs, so the text should end looking the same as it does in other Windows applications (assuming it’s the same font and size, of course). The Linux version that you’re running uses a completely different font renderer, so it will be very hard to make it match exactly.
I don’t know much about wsl but they probably want to develop on headless linux why still being able to use GUI Emacs.
It actually is, you can’t run a desktop enviroment with it for example but it does let you open linux gui apps to be used from windows.
just use M-x set-frame-font
to adjust font settings and improve crispness in wsl2.
To get rid of the ugly border you can recompile wslg and set the colors to something different. You can also use something like X410 to handle your X windows, which is where I ended up.
I had this issue, then compiled emacs --with-pgtk
and fonts became way better.
However, recently, wsl2 was updated in my win11 and out of curiosity I had recompiled emacs without pgtk and fonts are actually crisp and look the same as --with-pgtk
.
I am staying with X due to better clipboard support, though, ugly white borders are something you have to “embrace” :)
My fonts look OK but they’re different fonts (and I’m running Citrix thin clients etc so that may well be messing with ability to do sub-pixel tweaking etc).
And I actually like my “native” and “wsl” emacs to look different… I share init.el files (~/.emacs.d/ is a symlink to /mnt/c/Users/… etc) but make sure I use different themes and change the frame title to make it easy to distinguish between the two instances.
I know I could do it all in just one instance but somehow this just feels cleaner for my cross-platform dev work…