-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fontconfig not finding fonts under /mingwXX/share/fonts #5762
Comments
This is possibly fixable by using the 'use_fontconfig' meson option Pango has, as that seems to be the root of the issue. I'll test this with a custom build in a moment. |
It seems this requires a newer Pango version. |
For example, Fontconfig doesn’t find fonts installed by the mingw-w64-x86_64-ttf-dejavu package. That’s strange, because the dejavu package calls |
Yes. By default Pango uses the Windows font system. It can be forced to use Fontconfig in code, and newer versions allow forcing Fontconfig by default. The version used in Msys2 does not support that, though. |
I’ve made Pango use Fontconfig with Msys2, and it works well 😄. The only problem I have is that the DejaVu fonts from the package are installed in a folder that’s not scanned by Fontconfig (they’re in |
How? |
You can look at how it’s done in WeasyPrint. It basically uses a simple Python binding, the same C code should work as well. This code works well with Msys2 as we use it for WeasyPrint’s CI (some tests rely on Fontconfig). |
I confirm. I also noticed this behavior when creating #6381. |
Maybe related to #6661 |
Can anyone test again with the latest packages? |
It doesn’t work for me. |
It’s strange, because it really looks like the same bug. But even with |
does #7230 (comment) help? |
It doesn’t help because I force Pango to use Fontconfig, even on Windows. Adding the fonts to |
I've added a few fonts to the mentioned directory (in subdirectories, like with the Adobe Source Code Pro package), and even after running fc-cache -rs, the fonts don't show up in any app I've tried (Inkscape, Gimp and Geany so far, all from official MSYS2 packages). Even the source code pro fonts don't show up. I tested putting fonts directly under the fonts directory, and that didn't work either.
The text was updated successfully, but these errors were encountered: