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

Half of the fonts missing, missing ones seem to be OTF and present ones TTF #20

Open
ghost opened this issue Jun 1, 2018 · 16 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 1, 2018

In FlatHub's GIMP 2.10, half of the fonts missing, missing ones seem to be OTF fonts, and present are as far as I can tell mostly TTF fonts. In Fedora's natively packaged GIMP 2.8, all fonts show up. All TeX fonts for example like TeX Gyre Pagella or Adventor are non-TTF and don't show up and they are a nice collection under good licensing, so it'd be really good if this could be fixed.

@ghost
Copy link
Author

ghost commented Jun 5, 2018

Anyone has an idea how to work around this? I saved my file with GIMP 2.10 already before noticing this, and I would really love to keep using the new GIMP version, but I kinda need to be able to change texts in my images...

@ghost
Copy link
Author

ghost commented Jun 5, 2018

Ok, if anyone on Fedora 28 has the same issue, this version works properly: https://copr.fedorainfracloud.org/coprs/srakitnican/gimp-2.10/ (shows all fonts unlike the flathub one)

@Jehan
Copy link
Collaborator

Jehan commented Jun 13, 2018

My guess is that /etc/fonts/fonts.conf should simply be patched to include common fonts directories which have been relocated under /run/host/.
I'll make some tests locally then I will update our flatpak and if all goes well, I'll make a patch to the Freedesktop SDK.

@Jehan
Copy link
Collaborator

Jehan commented Jun 13, 2018

This being said, I just tested (on Fedora 28 as well) and it looks like I have all the fonts actually!

@Jonast Do you have an example of fonts which you don't see in GIMP flatpak, and where is it installed (or if it comes from a package, what's the name of this package)?

@ghost
Copy link
Author

ghost commented Jun 13, 2018

Tex Gyre Pagella, Tex Gyre Adventor and others are missing. They are .otf files, and seem to be located in /usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/. Not sure what the exact package name is, but they're installed as part of texlive.

Edit: full list of relevant paths for Tex Gyre Pagella:

# locate pagella
/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-bold.otf
/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-bolditalic.otf
/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-italic.otf
/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf
/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf
/usr/share/texlive/texmf-dist/tex/latex/tex-gyre/tgpagella.sty
/usr/share/texlive/texmf-dist/tex/plain/font-change/font_pagella.tex

@ghost
Copy link
Author

ghost commented Sep 23, 2018

@Jehan was this fix ever released? Still not seeing those fonts and therefore unable to fully use the flathub version... (and the distro packaged one is super outdated 😢 )

@Jehan
Copy link
Collaborator

Jehan commented Sep 24, 2018

@Jonast No I have not had the time to look more deeply into this issue.

I am alone to maintain the flatpak package (and that's not the only thing I do, I also maintain, fix and improve various parts of core GIMP) so I would greatly appreciate if anyone could help with diagnosing and improving the flatpak build.

Otherwise I will look into it at some point, but I can't promise when. :-/

@ghost
Copy link
Author

ghost commented Sep 24, 2018

For what it's worth, just installing the TeX Gyre font package with # dnf install texlive-tex-gyre should be enough to reproduce it, at least on Red Hat's Fedora. You can confirm the correct package is installed by running # updatedb && locate pagella which should list texgyrepagella-regular.otf in a folder among others. You can then check the bug by just opening up flathub-packaged GIMP and checking the font list - TeX Gyre Pagella is supposed to be there if things worked. (for me it isn't)

@Jehan
Copy link
Collaborator

Jehan commented Sep 24, 2018

@Jonast So I had a quick test and confirmed that I also had the fonts under /usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre/, these are seen by native GIMP, not by flatpak GIMP.

So I investigated a bit. The fontconfig within the sandbox has this file for configuring host fonts /etc/fonts/conf.d/50-flatpak.conf. In particular, this line is of interest:

<dir>/run/host/fonts</dir>

As expected, I could check that /run/host/fonts maps to the system default fonts folder, which on Fedora is /usr/share/fonts/.
The problem seems to be that 4 folders under /usr/share/fonts/ are set as symbolic links: lm, lm-math, tex-gyre and tex-gyre-math (on my particular Fedora installation, someone else could have less or more depending on what font packages you installed). Unfortunately the flatpak sandbox was not able to reconstruct these folders after the remapping, so these symlinks end up broken (they link to paths which don't exist anymore).

I will have to report the bug upstream (to the Freedesktop runtime as I see that fontconfig is coming from there).

For the time being, you can add your fonts manually by opening the Preferences > Folders > Fonts and adding the folder /run/host/usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre (basically all folders of the host system are still available by adding /run/host/ prefix).

@Jehan
Copy link
Collaborator

Jehan commented Sep 24, 2018

@ghost
Copy link
Author

ghost commented Sep 24, 2018

Thanks so much for looking into this!! 🎉 🎈

@DanMan
Copy link

DanMan commented Jul 19, 2019

The GIMP flatpak from registry.fedoraproject.org has the fonts working correctly somehow, so maybe you can look how they've done it.

Unfortunately their flatpaks all only provide English versions though - can't have it all I guess…

@Jehan
Copy link
Collaborator

Jehan commented Jul 19, 2019

@DanMan I had no idea that Fedora had its own flatpak repository. Where can I see the manifest? When I click on GIMP on the page you give, I get a blank page.

@Jehan
Copy link
Collaborator

Jehan commented Jul 19, 2019

P.S.: I found this, but the files are weird: https://src.fedoraproject.org/flatpaks/gimp/tree/master

@DanMan
Copy link

DanMan commented Jul 19, 2019

I had a look, but I couldn't find it myself. Probably buried in some sort of build system.

@luzpaz
Copy link

luzpaz commented Apr 25, 2023

Any traction on this ?

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

No branches or pull requests

4 participants