I came across an issue using Emacs when switching to a wayland compositor (hyprland).
The fonts don’t look right as you can see at the screenshot below, but zooming in makes it better.
My current emacs build is using LUCID no PGTK.
I’m thinking of building another Emacs build with PGTK support that runs natively on Wayland without Xwayland. However i’d like to install them both.
As i use Lucid version on XMonad most the time, but still when i switching to wayland i could still have a better font.
u
You could check openSUSE or Arch Linux’s packaging to see how you can achieve this.
I think the one of openSUSE is the most concrete as it will use the Wayland binary on Wayland and the X11 binary on X11 and so on.
Check out the spec file here:
https://build.opensuse.org/package/view_file/editors/emacs/emacs.spec?expand=1
The build process starts at the %build section.
I’m using arch, couldn’t find anything like my case. But openSUSE build seems like a good way.