Commit ffbe4095 authored by Rex Dieter's avatar Rex Dieter
Browse files

support $XDG_CONFIG_HOME/fontconfig/fonts.conf

BUG: 304317
FIXED-IN: 4.9.4

fontconfig > 2.10.0 supports putting it's user config at
$XDG_CONFIG_HOME/fontconfig/fonts.conf now.
parent 5cc8a3d9
......@@ -31,6 +31,8 @@
#include <QByteArray>
#include <klocale.h>
#include <kde_file.h>
#include <KDE/KGlobal>
#include <KDE/KStandardDirs>
#include <QDir>
#include <stdarg.h>
......@@ -143,7 +145,18 @@ QString getConfigFile()
return files.front(); // Just return the 1st one...
}
else // Hmmm... no known files?
return home+"/.fonts.conf";
{
if(FcGetVersion() >= 21000)
{
QString targetPath(KGlobal::dirs()->localxdgconfdir()+"fontconfig");
QDir target(targetPath);
if(!target.exists())
target.mkpath(targetPath);
return targetPath+"/fonts.conf";
}
else
return home+"/.fonts.conf";
}
}
static QString getEntry(QDomElement element, const char *type, unsigned int numAttributes, ...)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment