Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3793 → Rev 3794

/branches/Version13x/Scribus/scribus/scfonts.cpp
41,6 → 41,7
#include <fontconfig/fontconfig.h>
#endif
 
#include "scpaths.h"
#include "util.h"
 
#include FT_INTERNAL_STREAM_H
955,7 → 956,7
}
 
#else
#ifndef QT_MAC
#if !defined(QT_MAC) && !defined(_WIN32)
 
void SCFonts::AddXFontPath()
{
1113,19 → 1114,20
ReadCacheList(pf);
ScApp->setSplashStatus( QObject::tr("Searching for Fonts") );
AddUserPath(pf);
// Search the system paths
QStringList ftDirs = ScPaths::getSystemFontDirs();
for (unsigned int i = 0; i < ftDirs.count(); i++)
AddScalableFonts( ftDirs[i] );
// Search Scribus font path
if (QDir(ScPaths::instance().fontDir()).exists())
AddScalableFonts( ScPaths::instance().fontDir() );
// if fontconfig is there, it does all the work
#if HAVE_FONTCONFIG
// Search fontconfig paths
for(QStrListIterator fpi(FontPath) ; fpi.current() ; ++fpi)
AddScalableFonts(fpi.current());
AddFontconfigFonts();
#else
// if FreeType thinks we are on Mac, let it search the default paths
#if FT_MACINTOSH
AddScalableFonts(QDir::homeDirPath() + "/Library/Fonts/");
AddScalableFonts("/Library/Fonts/");
AddScalableFonts("/Network/Library/Fonts/");
AddScalableFonts("/System/Library/Fonts/");
#endif
// on X11 look there:
#ifdef Q_WS_X11
AddXFontPath();
/branches/Version13x/Scribus/scribus/scpaths.h
24,6 → 24,8
const QString& docDir() const;
/** @brief Return path to icons directory*/
const QString& iconDir() const;
/** @brief Return path to the Scribus font directory */
const QString& fontDir() const;
/** @brief Return path to lib directory containing translations,
* keysets, etc. */
const QString& libDir() const;
58,6 → 60,7
// Members to hold system paths
QString m_docDir;
QString m_iconDir;
QString m_fontDir;
QString m_libDir;
QString m_pluginDir;
QString m_sampleScriptDir;
/branches/Version13x/Scribus/scribus/scpaths.cpp
78,14 → 78,14
}
 
qDebug(QString("scpaths: bundle at %1:").arg(pathPtr));
m_shareDir = strdup(QString("%1/Contents/share/scribus/").arg(pathPtr));
m_docDir = strdup(QString("%1/Contents/share/scribus/doc/").arg(pathPtr));
m_iconDir = strdup(QString("%1/Contents/share/scribus/icons/").arg(pathPtr));
m_sampleScriptDir = strdup(QString("%1/Contents/share/scribus/samples/").arg(pathPtr));
m_scriptDir = strdup(QString("%1/Contents/share/scribus/scripts/").arg(pathPtr));
m_templateDir = strdup(QString("%1/Contents/share/scribus/templates/").arg(pathPtr));
m_libDir = strdup(QString("%1/Contents/lib/scribus/").arg(pathPtr));
m_pluginDir = strdup(QString("%1/Contents/lib/scribus/plugins/").arg(pathPtr));
m_shareDir = QString("%1/Contents/share/scribus/").arg(pathPtr);
m_docDir = QString("%1/Contents/share/scribus/doc/").arg(pathPtr);
m_iconDir = QString("%1/Contents/share/scribus/icons/").arg(pathPtr);
m_sampleScriptDir = QString("%1/Contents/share/scribus/samples/").arg(pathPtr);
m_scriptDir = QString("%1/Contents/share/scribus/scripts/").arg(pathPtr);
m_templateDir = QString("%1/Contents/share/scribus/templates/").arg(pathPtr);
m_libDir = QString("%1/Contents/lib/scribus/").arg(pathPtr);
m_pluginDir = QString("%1/Contents/lib/scribus/plugins/").arg(pathPtr);
QApplication::setLibraryPaths(QString("%1/Contents/lib/qtplugins/").arg(pathPtr));
CFRelease(pluginRef);
CFRelease(macPath);
102,14 → 102,15
 
#elif defined(_WIN32)
QString appPath = qApp->applicationDirPath();
m_shareDir = strdup(QString("%1/share/").arg(appPath));
m_docDir = strdup(QString("%1/share/doc/").arg(appPath));
m_iconDir = strdup(QString("%1/share/icons/").arg(appPath));
m_sampleScriptDir = strdup(QString("%1/share/samples/").arg(appPath));
m_scriptDir = strdup(QString("%1/share/scripts/").arg(appPath));
m_templateDir = strdup(QString("%1/share/templates/").arg(appPath));
m_libDir = strdup(QString("%1/libs/").arg(appPath));
m_pluginDir = strdup(QString("%1/plugins/").arg(appPath));
m_shareDir = QString("%1/share/").arg(appPath);
m_docDir = QString("%1/share/doc/").arg(appPath);
m_fontDir = QString("%1/share/fonts/").arg(appPath);
m_iconDir = QString("%1/share/icons/").arg(appPath);
m_sampleScriptDir = QString("%1/share/samples/").arg(appPath);
m_scriptDir = QString("%1/share/scripts/").arg(appPath);
m_templateDir = QString("%1/share/templates/").arg(appPath);
m_libDir = QString("%1/libs/").arg(appPath);
m_pluginDir = QString("%1/plugins/").arg(appPath);
#endif
}
 
125,6 → 126,11
return m_iconDir;
}
 
const QString& ScPaths::fontDir() const
{
return m_fontDir;
}
 
const QString& ScPaths::libDir() const
{
return m_libDir;