I have rebuilt Emacs 29 with PGTK in order to get Emacs running natively and to fix the fonts, and i already have another emacs 29 build (Lucid) installed with i use On X.
I was surprised to see Emacs on wayland was running slower than its counterpart on Xwayland. Also the fonts issue was not fixed.
While zooming in makes the fonts look better. On X i don’t have this issue.
Below is screenshots of fonts on Wayland - Xwayland and X
I have a NVIDIA graphics card (GTX 1080), and a 4K monitor which I’d like to use with 150% fractional scaling. My experience is:
- GNOME worked, but the fractional scaling made the fonts blurry. 100% or 200% looks sharp, but 150% is bad.
- KDE, and various tiling wm compositors I tried, looked ok but had issues with flickering. I’d type something, and the cursor would often “move backwards” and look like I’ve deleted a bunch of characters, and then jump back forward.
- Hyprland was the only one where Emacs worked perfectly. But then I got flickering in games.
So I’m just sticking to X, probably until I get another PC.BTW, WSL uses Wayland as well, and I couldn’t run Emacs on that either. Input lag when I maximize the window, as in this, but the workarounds there didn’t solve it. I ended running it in XWayland in WSL and that worked fine.
Recently I was reading #emacs and saw that some claim pgtk, or native wayland, is bodged and not feature complete. Is that right? If so, which is the best toolkit to compile from source with to run under XWayland?
The author of the emacs pgtk code says that no one who has X installed should use pgtk – he’s stated on several occasions that if you have X at all then you should use a supported X toolkit in Emacs for best results.
I’ve seen counter-arguments that pgtk is still beneficial if you happen to have a “high DPI display”, but I believe that’s the only argument I’ve ever seen for using pgtk under X.
I always build
--with-x-toolkit=lucid
myself, and can happily vouch for that one. I don’t use Wayland, though.
If you’re not on a high DPI display, then all I can think is that some font hinting/autoaliasing settings must be out of wack.
All the screenshots look blurry to me.
Btw, if you are upscaling XWayland windows, have you tried disabling that and then using a higher font size in Emacs?
I use pgtk on Arch Linux Swaywm.
Fonts are looking good for meWhat’s your font config? Using any anti aliasing or hinting?
Having had a hidpi monitor for ages, PGTK has been so great and so incredibly better at rendering fonts, menus, bars, etc, tan any X toolkit, and managing scaling correctly, that I switched while still was an alpha version in someone’s github. The worst problem is that pixmaps are shown 1:1, pixel by pixel (being impossible to distinguish on a high dpi display), while the text is properly scaled, it’s unusable.
Never looked back. Well, no, I’ve tried the X version a few times and it sucked, as I remembered.
I like the vertical bars outlining the function structures - how is that done?