[gimp/gimp-2-8] Bug 751178: GIMP doesn't load fonts from folders...



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

 app/text/gimp-fonts.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/app/text/gimp-fonts.c b/app/text/gimp-fonts.c
index ced8ef8..36fbe96 100644
--- a/app/text/gimp-fonts.c
+++ b/app/text/gimp-fonts.c
@@ -150,7 +150,17 @@ gimp_fonts_add_directories (FcConfig    *config,
   path = gimp_path_parse (path_str, 256, TRUE, NULL);
 
   for (list = path; list; list = list->next)
-    FcConfigAppFontAddDir (config, (const guchar *) list->data);
+    {
+#ifdef G_OS_WIN32
+      gchar *dir = g_win32_locale_filename_from_utf8 (list->data);
+#else
+      gchar *dir = g_strdup (list->data);
+#endif
+
+      FcConfigAppFontAddDir (config, (const FcChar8 *) dir);
+
+      g_free (dir);
+    }
 
   gimp_path_free (path);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]