After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751178 - GIMP doesn't load fonts from folders which path contains Cyrillic characters
GIMP doesn't load fonts from folders which path contains Cyrillic characters
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.8.14
Other Windows
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2015-06-18 20:04 UTC by Vladimir
Modified: 2015-06-22 18:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vladimir 2015-06-18 20:04:34 UTC
1. Create folder with Cyrillic name. For example, D:\Шрифты
2. Put some font files in this folder
3. Add this folder's path to GIMP Font Folders
4. Press "Refresh font list" in fonts dialog.

Fonts from that folder should appear in list, but they don't. When adding folders with ASCII only names, all works fine.

GIMP output in verbose mode doesn't contain any errors or warnings.
Comment 1 Vladimir 2015-06-21 16:55:19 UTC
This bug also appears on nightly build of stable GIMP and the development versions of GEGL and BABL.
http://nightly.darkrefraction.com/gimp/stable/gimp-stable-x86_64-2015-06-21.exe
Comment 2 Massimo 2015-06-21 17:19:53 UTC
the problem should be here:

https://git.gnome.org/browse/gimp/tree/app/text/gimp-fonts.c#n154

we could try something like:

https://git.gnome.org/browse/gimp/tree/libgimpbase/gimpmetadata.c#n527

because apparently, behind the scenes, fontconfig calls stat and IIRC
that does not work with UTF8 encoded paths.
Comment 3 Michael Natterer 2015-06-22 07:36:09 UTC
That looks like just the right solution, please go ahead.
Comment 4 Massimo 2015-06-22 18:35:09 UTC
I pushed this commit to gimp-2-8 and master.

commit 9bb3da5ed5099566cc3e555859080f248dc0befe
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Mon Jun 22 20:23:08 2015 +0200

    Bug 751178: GIMP doesn't load fonts from folders...

    which path contains Cyrillic characters

    (cherry picked from commit f0028624df617c53e85229f36c0653eb7e078aa4)

     Conflicts:
        app/text/gimp-fonts.c


I cross-compiled gimp-2-8 and it seems
'g_win32_locale_filename_from_utf8' declaration
does not require any other header inclusion.

Btw, despite the name, it seems it should work also for
directories:

https://git.gnome.org/browse/glib/tree/glib/ggettext.c#n78

I'm closing the bug hoping it works, in case it doesn't
please reopen.