1 point

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.

permalink
report
reply
1 point

I don’t know much about wsl but they probably want to develop on headless linux why still being able to use GUI Emacs.

permalink
report
parent
reply
1 point

That doesn’t make any sense. WSL is not a headless Linux.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

just use M-x set-frame-font to adjust font settings and improve crispness in wsl2.

permalink
report
reply
1 point

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.

permalink
report
reply
1 point

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” :)

permalink
report
reply
1 point

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.

https://preview.redd.it/eu42hdi1652c1.png?width=1542&format=png&auto=webp&s=73cfb262d81b84a56950b13d5bed026f9058a08e

I know I could do it all in just one instance but somehow this just feels cleaner for my cross-platform dev work…

permalink
report
reply

Emacs

!emacs@communick.news

Create post

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for “emacs” and “vi” link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments