hamster
hamster copied to clipboard
Font issue with snap on Ubuntu
Hi,
I'm having an issue with the font in hamster. It doesn't display correctly. I'm running
Distributor ID: Ubuntu
Description: Pop!_OS 18.04 LTS
Release: 18.04
Codename: bionic
This is what it looks like for me:
I don't know what other info is useful for you. Just let me know.
I don't have this issue with xUbuntu 20.04 upgraded from 19.10 running i3 instead of xfce.
@Midnighter, this is most certainly not a hamster issue. Recent pango releases can't render certain fonts any more, like type1 and bitmap fonts, see e.g. pango #386. Perhaps you have changed the font for hamster some time in the past, and selected a font that your system can't render (any more).
Hamster itself does very little about fonts except trying to figure out your environment's default font. It does this using the Gtk get_style()
function. Please run this in your environment:
python3 -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk;print(Gtk.Label(label="foo").get_style().font_desc.to_string())'
Ignore the warnings, and provide us the output.
Btw, Which desktop environment are you using? You may want to check your GNOME font settings with the gnome-tweaks
tool.
I'm sure it's a problem with my system, too. I just had no idea how to approach finding a solution. I'm using other snaps and have never seen a font issue there.
The output of your command is Fira Sans 10
.
Output of printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"
:
Desktop: pop:GNOME
Session: pop
I've nuked $HOME/snap/hamster-snap
but still see the same issue. I'm also pretty sure I never configured a different font.
Thank you for any further suggestions.
What does gnome-tweaks font selection say? IMO if the graphical font selection in GNOME tweaks can display your font, hamster should be able to render it, too. Using the snap package may also have an effect, I'm not sure whether snaps have full access to system fonts (or what happens if a snap package requests a font that the system doesn't provide).
Tweaks is doing okay.
I can try compiling hamster instead.
I wonder if it means anything that tweaks says "Fira Sans Book" whereas hamster just got "Fira Sans".
Same problem showing up here, also only with hamster. Using Ubuntu 11. Desktop: ubuntu:Gnome fonts: Default settings (Ubuntu regular, Sans Regular, Ubuntu Mono Regular, Ubuntu Bold). No idea, what to do - and how to reach my collected data ...
@Tobida Sorry I can't help with the font issue, but to "reach your collected data", you can do this from the command line:
hamster export tsv 2000-01-01 2021-01-05
.
You can find your sqlite hamster.db like this: find ~ -name hamster.db
. It's easy to make and restore backup copies ;-)
@GeraldJansen Thank you for this hint. I installed hamster as snap, so there seem to be no "hamster" command. I found the database - in my case here:
~/snap/hamster-snap/current/.local/share/hamster
I am able to start hamster at the commandline with hamster-snap. But with no effect, when i try to use the export command, its just opening the hamster-window. Do you have any idea how to export in a snap-context?
Sorry again, but I don't have any experience with the snap (or flatpak installations). A regular install from sources is not that hard, as a last resort (see the readme file). Copy your hamster.db to ~/.local/share/hamster and you'll be good to go.
@GeraldJansen Thank you for the inspiration and the fast reaction. I uninstalled hamster-snap and installed hamster from sources following the readme. Works great. And the font-issue is gone! Seem to have to do with the snap-package, somehow.
A bit of googling comes up with some possibly related solutions to problems with fonts in snap packages. Fonts installed in ~/.fonts or ~/.local/share/fonts may not be picked up or there may be problems with your .cache/fontconfig in your home or snap directory. A few links: https://github.com/Microsoft/vscode/issues/63194 https://askubuntu.com/questions/1224125/font-characters-displayed-as-squares-in-ubuntu-18-04