flathub / com.visualstudio.code

https://flathub.org/apps/details/com.visualstudio.code
149 stars 69 forks source link

No subpixel font smoothing in flathub version, subpixel smoothing in MS .deb version. #398

Open trr opened 1 year ago

trr commented 1 year ago

Flathub version doesn't have subpixel font smoothing, while the .deb from Microsoft's repositories does, with same font and same config.

Using most recent flathub version at the time. I tried manually starting with --force-device-scale-factor=1 added to the flatpak run command as recommended by many sites and it didn't help.

This coupled with issues with certain extensions that don't expect to be sandboxed, and the in-built terminal needing extra tweaks makes the flatpak version a worse experience. No doubt there's extra difficulty passing in the font smoothing config into a flatpak app but other flatpak apps do manage as well as electron apps that don't use flatpak.

westurner commented 7 months ago

Various font-related flags I found in solving for blurry fonts on wayland (https://github.com/flathub/com.visualstudio.code/issues/471#issuecomment-1980041867 ) ::

--font-render-hinting=none
--font-render-hinting=full

--enable-font-subpixel-positioning
--disable-font-subpixel-positioning

--enable-use-zoom-for-dsf

--force-device-scale-factor=1.12

--disable-gpu

And then this worked; which also already works in VScodium fwics:

flatpak --socket=wayland run com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland

edit: here's my .desktop file, which supersedes the system com.visualstudio.code.desktop:

$ cat ~/.local/share/applications/com.visualstudio.code.desktop 
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=code --file-forwarding --socket=wayland com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland --reuse-window @@ %F @@
Icon=com.visualstudio.code
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;
X-Flatpak-Tags=proprietary;
X-Flatpak=com.visualstudio.code

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=code --file-forwarding --socket=wayland com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland --new-window @@ %F @@
Icon=com.visualstudio.code