summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-10-22 22:10:41 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-10-22 22:10:41 +0000
commitde6d47ed290e02aa4bdc64d6cea5a6c8c20e61c7 (patch)
tree3e32d523a581b9d55d055f3fd11416b2a0ae28f3 /src/libnrtype
parentPreferences: cleanup (diff)
downloadinkscape-de6d47ed290e02aa4bdc64d6cea5a6c8c20e61c7.tar.gz
inkscape-de6d47ed290e02aa4bdc64d6cea5a6c8c20e61c7.zip
Fix compilation on Ubuntu Trusty
pango_fc_font_map_get_config() is available since pango 1.38 but trusty only has pango 1.36. While calling this function is the "proper" way to get the FcConfig attached to the FontFactory's font map, FcConfigAppFontAddDir() reference says "If config is NULL, the current configuration is used." and it seems to the current configuration is suitable to use in this case (which might change if we ever start to use multiple font maps with different FcConfig's attached but should be fine for now...)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 677b8abe7..95537734d 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -934,7 +934,10 @@ void font_factory::AddFontsDir(char const *utf8dir)
dir = g_filename_from_utf8(utf8dir, -1, NULL, NULL, NULL);
# endif
- FcConfig *conf = pango_fc_font_map_get_config(PANGO_FC_FONT_MAP(fontServer));
+ FcConfig *conf = NULL;
+# if PANGO_VERSION_CHECK(1,38,0)
+ pango_fc_font_map_get_config(PANGO_FC_FONT_MAP(fontServer));
+# endif
FcBool res = FcConfigAppFontAddDir(conf, (FcChar8 const *)dir);
if (res = FcTrue) {
g_info("Fonts dir '%s' added successfully.", utf8dir);