Closed codingepaduli closed 2 years ago
The document does not have embedded the font. The font it references is Helvetica, which is non-free, and there does not seem to have an alternative font or poppler is not finding it.
When I use Evince, not installed by Flatpak, but by Debian repository with apt-get install
, I can see the document. Running
evince LETTERA_NOTIFICA_TRASFERIMENTO_SECONDARIA_II_GRADO_202021_7.pdf
I will see this image:
So I have some font installed from the Debian repository. How can I check I'm using Helvetica and NOT an alternative free font? Any suggestion?
Can't you add an extra non-free package to install ?
Thanks for your great work
I have the same issue! This issue is really frustrating.
There are a lot of bugs about fonts in flatpak.
Searching in the original repository https://github.com/flatpak/flatpak/ , in the issue page with the filter "is:issue is:open font", it will show a lot of bugs, as you can see here: https://github.com/flatpak/flatpak/issues?page=1&q=is%3Aissue+is%3Aopen+font
I can't reproduce the problem here.
Outside the sandbox:
Inside the sandbox
In both cases it's an Helvetica replacement font that's getting chosen, and it's exported by the host (though it's a user font in the latter case). What does the font properties dialogue look like on your systems when opening a broken file?
You can check whether the font that gets selected is available inside the sandbox with:
flatpak run --command="fc-list" org.gnome.Evince | grep -i arial
for example
I can't figure how to fix it. But it seems to point to a font that doesn't exist.
$ flatpak run --command=sh org.gnome.Evince
[π¦ org.gnom[π¦ org.gnome.Evince ~]$ ls -lha /run/host/fonts/X11/Type1/qhvr.pfb
lrwxrwxrwx 1 nfsnobody nfsnobody 51 fev 28 2019 /run/host/fonts/X11/Type1/qhvr.pfb -> ../../../texmf/fonts/type1/public/tex-gyre/qhvr.pfb
[π¦ org.gnome.Evince ~]$ ls -lha /run/host/fonts/X11/Type1/../../../texmf/fonts/type1/public/tex-gyre/
ls: nΓ£o foi possΓvel acessar '/run/host/fonts/X11/Type1/../../../texmf/fonts/type1/public/tex-gyre/': Arquivo ou diretΓ³rio inexistente
I am facing the same issue with the document passport-application-form-data.pdf. This document has form fields that will not show the content after entering text. I am using flatpak 1.12.4 on Ubuntu 20.04. Another example of a PDF that is affected by this issue is given in the Ubuntu bug tracker at https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1448778. The file theory_scalar.pdf will not show correctly due to missing fonts.
I originally reported the issue to Evince https://gitlab.gnome.org/GNOME/evince/-/issues/1739 where others could not reproduce this issue using this flatpak. And I also don't have these issues with flatpak 1.12.4 on a Arch Linux VM.
Running flatpak run --command="fc-list" org.gnome.Evince | grep -i arial
will not return anything on either settings (Ubuntu, Arch).
Try:
flatpak run --command=fc-cache org.gnome.Evince -f -v
and then open the document again.
I confirm that it does solve the problem.
This is a known issue in flatpak: https://github.com/flatpak/flatpak/issues/3191
I can also confirm that running fc-cache
inside the flatpak fixes the issues that I saw with my form and the example PDF with the graph.
However, you have to run this every time the flatpak is installed in a new setup or after cleaning left-over files as the font cache will not persists.
before:
βββ cache
βΒ Β βββ fontconfig
βΒ Β βββ tmp
βββ config
βΒ Β βββ glib-2.0
βΒ Β βΒ Β βββ settings
βΒ Β βββ ibus
βΒ Β βΒ Β βββ bus
βΒ Β βββ user-dirs.dirs
βββ data
βββ recently-used.xbel
9 directories, 2 files
after flatpak run --command=fc-cache org.gnome.Evince -f -v
:
$ tree $HOME/.var/app/org.gnome.Evince/
βββ cache
βΒ Β βββ fontconfig
βΒ Β βΒ Β βββ 02c3d2a553cc0a59ef9c1e729da08704-le64.cache-7
βΒ Β βΒ Β βββ 0ddbdbd750e3249d438f72b69cb90ce5-le64.cache-7
βΒ Β βΒ Β βββ [...]-le64.cache-7
βΒ Β βΒ Β βββ CACHEDIR.TAG
βΒ Β βΒ Β βββ [...]-le64.cache-7
βΒ Β βββ tmp
βββ config
βΒ Β βββ glib-2.0
βΒ Β βΒ Β βββ settings
βΒ Β βββ ibus
βΒ Β βΒ Β βββ bus
βΒ Β βββ user-dirs.dirs
βββ data
βββ recently-used.xbel
9 directories, 104 files
Pdf file (in attachment) is opened, but fonts are missing.
When I start Evince, I got these lines:
When Evince has been started and I choose to open the file (in the recent documents), I got these lines in output:
This is the file to test.
LETTERA_NOTIFICA_TRASFERIMENTO_SECONDARIA_II_GRADO_202021_7.pdf
When I open it with Chromium, I get this image:
When I open it with Evince, I get this: