parent
a563a1802e
commit
2e09c62ba1
13
src/fccfg.c
13
src/fccfg.c
|
@ -582,6 +582,7 @@ FcConfigMapFontPath(FcConfig *config,
|
||||||
FcStrList *list;
|
FcStrList *list;
|
||||||
FcChar8 *dir;
|
FcChar8 *dir;
|
||||||
FcChar8 *map;
|
FcChar8 *map;
|
||||||
|
FcChar8 *retval;
|
||||||
|
|
||||||
list = FcConfigGetFontDirs(config);
|
list = FcConfigGetFontDirs(config);
|
||||||
if (!list)
|
if (!list)
|
||||||
|
@ -595,7 +596,17 @@ FcConfigMapFontPath(FcConfig *config,
|
||||||
map = FcStrPairSecond(dir);
|
map = FcStrPairSecond(dir);
|
||||||
if (!map)
|
if (!map)
|
||||||
return 0;
|
return 0;
|
||||||
return FcStrBuildFilename(map, path + strlen((char *) dir), NULL);
|
retval = FcStrBuildFilename(map, path + strlen((char *) dir), NULL);
|
||||||
|
if (retval)
|
||||||
|
{
|
||||||
|
size_t len = strlen ((const char *) retval);
|
||||||
|
if (retval[len-1] == '/')
|
||||||
|
{
|
||||||
|
/* trim the last slash */
|
||||||
|
retval[len-1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
FcBool
|
FcBool
|
||||||
|
|
Loading…
Reference in New Issue