• habamax@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

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

  • radian_@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I find it looks and performs* better in WSL1 with GWSL

    *until I access files in the Windows volumes.

    • noooit@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I didn’t know gwsl works for wsl1. I’m gonna give it a try. WSL1 is so much better if you exclude missing syscalls.

    • teaspoonzzz@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Yep that’s what finally caused me to switch to using Emacs on WSL2 (instead of the Windows build). Then you can also get rid of that ugly white border from WSLg.

      • pekudzu@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        any details on that white border stuff? pgtk didnt autofix it for me in the past and id love to not have it searing my eyes

        • teaspoonzzz@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          Not sure if there’s something else missing in your setup. I’m using WSL2 (Ubuntu), and in my case all I had to do was compile Emacs passing the --with-pgtk flag, then:

          sudo apt install gnome-tweaks yaru-theme-gtk yaru-theme-icons
          

          And ran gnome-tweaks in the terminal, and changed the application and icon themes to Yaru-dark.

        • filippoargiolas@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          that sometimes happens when wslg has issues with bind mounting the runtime dir from the system distro or runtime dir permissions, were you by chance using it with a uid != 1000?

    • Massive-Squirrel-255@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I downloaded the source code for emacs and compiling it locally with the --with-pgtk flag. (And --with-native-compilation for better performance)

      That made my life improve a lot.

      • glgmacs@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        You can also install pgtk emacs directly from snaps when under Ubuntu in wsl, if you prefer.

        • Massive-Squirrel-255@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          I get a warning when compiling emacs from source with the pgtk flag telling me about a known bug in my version of gtk that causes problems when opening and closing multiple emacs instances. Do you know anything about this? In particular would it be resolved by switching to the snap?

          • glgmacs@alien.topB
            link
            fedilink
            English
            arrow-up
            1
            ·
            10 months ago

            I have no idea about that compilation issue you get. Since the emacs snaps (pgtk and x) are pre built binaries, you wont get that problem. Ive been using Emacs PGTK from snaps on WSLg for a year without any issue.

  • Objective_Code1436@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Interesting. I’ll have to investigate. I use wsl2 and always have. I’ll report back if I notice some differences.

  • grimscythe_@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    First and foremost these are different fonts, so it’s hard to draw a comparison. However, I do agree that the font used in the gui lacks crispness.

  • Hammar_Morty@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    It looks a lot like when an app doesn’t know about the current fractional scaling. Are you doing any scaling?

  • schmerg-uk@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    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…

  • db48x@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    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.

    • Kwisacks@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

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

        • Kwisacks@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          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.