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

Tiny font on 4.0.0 release #109

Closed
sonjoonho opened this issue Jun 20, 2023 · 18 comments
Closed

Tiny font on 4.0.0 release #109

sonjoonho opened this issue Jun 20, 2023 · 18 comments

Comments

@sonjoonho
Copy link
Contributor

On the latest Snap release, all the emojis look tiny. I think this is because the FONTCONFIG workaround was remove in https://github.com/tom-james-watson/Emote/pull/96/files#diff-9636b5b799374fc956ab1e6d462a5051b62fd7404bb45aa6e63580d0e005f73fR13-R16. Restoring these lines appears to fix the issue.

image

@tom-james-watson
Copy link
Owner

Putting those lines back in the script reintroduces this issue for me: #96 (comment).

@sonjoonho
Copy link
Contributor Author

Ha that's fun. Okay, I'll see if there's something else we can do.

@tom-james-watson
Copy link
Owner

I'll try and check on some other machines today

@tom-james-watson
Copy link
Owner

What distro are you on? I'm testing on debian 12. I have access to ubuntu 22.04 too.

@tom-james-watson
Copy link
Owner

Just tested on a Fedora 38 VM and both snap and flatpak versions work fine with no obvious issues. Are you using a Wayland or an X11 session?

@andrewbrey
Copy link

andrewbrey commented Jun 20, 2023

I just upgraded from 3.0.3 to 4.0.0 of my snap build and I too have the small font size issue. I'm on PopOS 22.04 with Gnome 42 and X11.

image

I don't know if this is related, but in case it is, I noticed that in my "about" screen it's indicated that this is a "dev build" which was unexpected given that I installed using snap install emote (and I did not specify any specific "dev" channel).

image

@tom-james-watson
Copy link
Owner

The about thing is a separate bug (#111).

Do you see the tiny fonts if you try the flatpak version, if you're willing to test that out?

@andrewbrey
Copy link

andrewbrey commented Jun 20, 2023

The about thing is a separate bug (#111).

Gotcha - thanks!

Do you see the tiny fonts if you try the flatpak version, if you're willing to test that out?

I just tried the flatpak version and it installs fine, but for me I can't actually get the window to show up, and checking journalctl I see the following output:

Jun 20 10:06:52 poppy emote_emote.desktop[9414]: Traceback (most recent call last):
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/__init__.py", line 88, in handle_accelerator
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/__init__.py", line 103, in create_picker_window
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/picker.py", line 54, in __init__
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/picker.py", line 85, in init_header
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/picker.py", line 143, in init_skintone_button
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/snap/emote/20/lib/python3.10/site-packages/emote/user_data.py", line 130, in load_skintone_index
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/usr/lib/python3.10/shelve.py", line 243, in open
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:     return DbfilenameShelf(filename, flag, protocol, writeback)
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/usr/lib/python3.10/shelve.py", line 227, in __init__
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:     Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:   File "/usr/lib/python3.10/dbm/__init__.py", line 95, in open
Jun 20 10:06:52 poppy emote_emote.desktop[9414]:     return mod.open(file, flag, mode)
Jun 20 10:06:52 poppy emote_emote.desktop[9414]: _dbm.error: [Errno 2] No such file or directory: '/home/me/snap/emote/20/.local/share/Emote/user_data'

I just noticed that it's loading snap filesystem things from the flatpak launch process - that seems like a red herring maybe?

@tom-james-watson
Copy link
Owner

Moved flatpak error to #112.

@tom-james-watson
Copy link
Owner

I have just tested on a separate Ubuntu 22.04 machine and confirm that I do see this with the snap version, but not the flatpak version.

@andrewbrey also says in #112 that the flatpak version doesn't have this issue.

@andrewbrey
Copy link

andrewbrey commented Jun 20, 2023

off topic - just as color commentary, this is not the first time I've encountered funny font issues with snaps ( for example beekeeper-studio/beekeeper-studio#695 ) and I've found each time that just switching to another format (flatpak, appimage, etc) just tends to work better with respect to fonts. Bummer that it's a persistent pain point with snap builds of applications 😟

tom-james-watson added a commit that referenced this issue Jun 20, 2023
@tom-james-watson
Copy link
Owner

Can confirm this fix breaks the app both on debian 12 and fedora 38, but fixes Ubuntu 22.04. I wonder if it's specifically a problem with ubuntu derivatives.

@tom-james-watson
Copy link
Owner

I've just pushed a new snap version that attempts to fix this issue by applying @sonjoonho's font workaround, but only if the system is detected as being a ubuntu-derivative - a6abad4.

This is a pretty shit workaround that will probably break, but as far as I can tell this should fix the issue on the systems we have reports on, without breaking it on the systems we know the fix breaks things on.

Can you please refresh your snap installation and check whether it now displays with normal fonts?

@sonjoonho
Copy link
Contributor Author

Thanks Tom! I can confirm that this works on my Ubuntu installation. The need for the workaround is pretty annoying, but from a little bit of Googling it looks like fonts are just a bit of a mess with Snaps.

@tom-james-watson
Copy link
Owner

@SuperSandro2000 - I can't reply inline to the comment you made on a6abad4. Unfortunately /etc/os-release when running inside the snap returns stuff about Ubuntu Core, not the actual system values. You can explore a bit what is possible if you do snap run --shell emote - that drops you into the same environment that script will run in.

@tom-james-watson
Copy link
Owner

If you can find some way of extending the check to exempt nixos then let me know.

@SuperSandro2000
Copy link

I don't have snap on my machine so I can't really test it but it should be possible to just grep case insensitive for ubuntu or something. /etc/lsb-release should exist on many many distros and just relying on that is not a very good idea.

@tom-james-watson
Copy link
Owner

Looks like this also breaks Ubuntu 23.04. Opening a new issue: #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants