Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap version does not use my subpixel rendering settings #10429

Closed
soredake opened this issue Feb 23, 2021 · 26 comments
Closed

snap version does not use my subpixel rendering settings #10429

soredake opened this issue Feb 23, 2021 · 26 comments

Comments

@soredake
Copy link

soredake commented Feb 23, 2021

Originally reported here https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1916342

Steps to reproduce

  1. Start telegram from snap
  2. Fonts using grayscale rendering instead of my settings (rgb)

Expected behaviour

Snap should import my font settings from ~/.config/fontconfig/fonts.conf and use rgb subpixel rendering
rgb

Actual behaviour

Telegram from snap uses default grayscale rendering, due to not importing user font settings.
non-rgb

Configuration

Operating system: Kubuntu 20.10

Version of Telegram Desktop: 2.5.9

Installation source (Linux Only) - the official website / GitHub releases / flatpak / snap / distribution package: Snap

Used theme:

Logs: Insert log.txt here (if necessary)
@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 23, 2021

Snap should import my font settings from ~/.config/fontconfig/fonts.conf and use rgb subpixel rendering

tdesktop snap doesn't have anything special about font settings... Only standard snap scripts.

@soredake
Copy link
Author

soredake commented Feb 23, 2021

Snap should import my font settings from ~/.config/fontconfig/fonts.conf and use rgb subpixel rendering

tdesktop snap doesn't have anything special about font settings... Only standard snap scripts.

https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1916342/comments/3 https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1916342/comments/5

https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/snapcraft.yaml#n15

@ilya-fedin
Copy link
Contributor

I don't want to implement font settings reading manually...

@soredake
Copy link
Author

@john-preston

@ilya-fedin
Copy link
Contributor

I would say this is ridiculous, making font settings reading to be manually implemented by snap developers. I don't imagine how each app will parse fontconfig files manually...

@soredake
Copy link
Author

I would say this is ridiculous, making font settings reading to be manually implemented by snap developers. I don't imagine how each app will parse fontconfig files manually...

Chromium in snap does this automatically, and i don't see any manual font settings loading in snapcraft file.

@ilya-fedin
Copy link
Contributor

Chromium in snap does this automatically

How does it do?

@ilya-fedin
Copy link
Contributor

I'm afraid it is not related to fontconfig... gtk reads font settings from xsettings/gsettings rather than from fontconfig files, so chromium and other gtk applications will just work once you set font rendering settings in your DE (if it sets the settings for gtk).

@anonymouse64
Copy link

Can the telegram desktop be adapted to use one of the snapcraft extensions which provide this functionality automatically? see https://snapcraft.io/docs/snapcraft-extensions

@ilya-fedin
Copy link
Contributor

Can the telegram desktop be adapted to use one of the snapcraft extensions which provide this functionality automatically?

No, kde-neon extension is garbage. Here I stated why.

@ilya-fedin
Copy link
Contributor

@soredake will font style be right if you run Telegram with XDG_CURRENT_DESKTOP=GNOME?

@soredake
Copy link
Author

soredake commented Feb 25, 2021

@soredake will font style be right if you run Telegram with XDG_CURRENT_DESKTOP=GNOME?

Yes, with "GNOME" rgb is applied to telegram fonts, but hinting (i set it to medium, default is slight) is not.

Save picture and zoom to maximum to see difference.

snap with XDG_CURRENT_DESKTOP=GNOME
snap

flatpak with --filesystem=xdg-config/fontconfig:ro
flatpak

@ilya-fedin
Copy link
Contributor

but hinting (i set it to medium, default is slight) is not.

xrdb -query | grep Xft.hintstyle

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 25, 2021

Yes, with "GNOME" rgb is applied to telegram fonts, but hinting (i set it to medium, default is slight) is not.

btw, does chromium have the same problem?

@soredake
Copy link
Author

but hinting (i set it to medium, default is slight) is not.

xrdb -query | grep Xft.hintstyle

Do i need to run it in snap or host system?

@ilya-fedin
Copy link
Contributor

Do i need to run it in snap or host system?

on host

@soredake
Copy link
Author

Yes, with "GNOME" rgb is applied to telegram fonts, but hinting (i set it to medium, default is slight) is not.

btw, does chromium have the same problem?

Yes, same problem with snap version.

snap:
snap_chromium

ppa:
ppa_chromium

@soredake
Copy link
Author

Do i need to run it in snap or host system?

on host

изображение

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 25, 2021

Yes, same problem with snap version.

So snap doesn't really support fontconfig even with extensions. Chromium works with rgba just because gtk reads settings from Xft (Qt does the same if XDG_CURRENT_DESKTOP is set to one of GNOME, UNITY, XFCE) rather than from fontconfig.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 25, 2021

@Aokromes looks like you can close the issue, it's an issue with snap itself

@soredake
Copy link
Author

@anonymouse64 can you reopen my launchpad issue? Because using extensions is clearly not an option.

@soredake
Copy link
Author

Yes, same problem with snap version.

So snap doesn't really support fontconfig even with extensions. Chromium works with rgba just because gtk reads settings from Xft (Qt does the same if XDG_CURRENT_DESKTOP is set to one of GNOME, UNITY, XFCE) rather than from fontconfig.

Sad that it does not read Xft.hintstyle.

@ilya-fedin
Copy link
Contributor

Sad that it does not read Xft.hintstyle.

It reads, as I can see in Qt code. The difference might be due to another reason (e.g. the difference in freetype versions).

@ilya-fedin
Copy link
Contributor

Or it could be due to some more fontconfig-specific settings like lcd filter

@soredake
Copy link
Author

soredake commented Feb 25, 2021

Yes, same problem with snap version.

So snap doesn't really support fontconfig even with extensions. Chromium works with rgba just because gtk reads settings from Xft (Qt does the same if XDG_CURRENT_DESKTOP is set to one of GNOME, UNITY, XFCE) rather than from fontconfig.

So, i've done sudo cp ~/.config/fontconfig/fonts.conf /etc/fonts/local.conf, reinstalled chromium in snap, and now font rendering is same, fonts hook is indeed working, it just does not read ~/.config/fontconfig/fonts.conf

https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1916867

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants