diff --git a/Core/optionHandling.cc b/Core/optionHandling.cc index 3dfe54170306469b9c6c0d7cfc9f2673d682dece..cbc869646be8498814a2767ac9a79f5e5e757867 100644 --- a/Core/optionHandling.cc +++ b/Core/optionHandling.cc @@ -218,6 +218,11 @@ void Core::setupOptions() { tempDir.cd("Icons"); OpenFlipper::Options::iconDir(tempDir.absolutePath()); + // Set the Path to the Fonts + tempDir = QDir(OpenFlipper::Options::applicationDir()); + tempDir.cd("Fonts"); + OpenFlipper::Options::fontsDir(tempDir.absolutePath()); + QStringList optionFiles; // ============================================================== diff --git a/common/GlobalOptions.cc b/common/GlobalOptions.cc index 1f42b4024a7babcf3807c1b050aa73631d62f684..6f30c38eec73c4036851497e62bd4344933a4f09 100644 --- a/common/GlobalOptions.cc +++ b/common/GlobalOptions.cc @@ -66,6 +66,9 @@ static QDir textureDir_; /// Stores the Path to the Icons static QDir iconDir_; +/// Stores the Path to the Fonts +static QDir fontsDir_; + /// Stores all available option files in the Order in which they should be used static QStringList optionFiles_; @@ -229,6 +232,7 @@ QDir pluginDir() { return pluginDir_; } QDir shaderDir() { return shaderDir_; } QDir textureDir() { return textureDir_; } QDir iconDir() { return iconDir_; } +QDir fontsDir() { return fontsDir_; } QDir currentDir() { return currentDir_; } QDir currentScriptDir(){ return currentScriptDir_; } @@ -238,6 +242,7 @@ QString pluginDirStr() { return pluginDir_.absolutePath(); } QString shaderDirStr() { return shaderDir_.absolutePath(); } QString textureDirStr() { return textureDir_.absolutePath(); } QString iconDirStr() { return iconDir_.absolutePath(); } +QString fontsDirStr() { return fontsDir_.absolutePath(); } QString currentDirStr() { return currentDir_.absolutePath(); } QString currentScriptDirStr(){ return currentScriptDir_.absolutePath();} @@ -248,6 +253,7 @@ void pluginDir(QDir _dir) { pluginDir_ = _dir; } void shaderDir(QDir _dir) { shaderDir_ = _dir; } void textureDir(QDir _dir) { textureDir_ = _dir; } void iconDir(QDir _dir) { iconDir_ = _dir; } +void fontsDir(QDir _dir) { fontsDir_ = _dir;} void configDir(QDir _dir) { configDir_ = _dir; } void currentDir(QDir _dir) { currentDir_ = _dir; } void currentScriptDir(QDir _dir) { currentScriptDir_ = _dir; } @@ -293,7 +299,16 @@ bool textureDir(QString _dir) { bool iconDir(QString _dir) { QDir tmp(_dir); if (tmp.exists()) { - iconDir_ = tmp; + iconDir_ = tmp; + return true; + } + return false; +} + +bool fontsDir(QString _dir) { + QDir tmp(_dir); + if (tmp.exists()) { + fontsDir_ = tmp; return true; } return false; diff --git a/common/GlobalOptions.hh b/common/GlobalOptions.hh index 1ad0446c229ffe191ba9fd3fccd5b164c4464a81..82cfd9bedbcb382259d2966c6fff001e7d4b37ee 100644 --- a/common/GlobalOptions.hh +++ b/common/GlobalOptions.hh @@ -82,6 +82,10 @@ QDir shaderDir(); DLLEXPORT QDir iconDir(); +/// Returns the Path to Fonts +DLLEXPORT +QDir fontsDir(); + /// Returns the base Path of the application DLLEXPORT QString applicationDirStr(); @@ -102,6 +106,10 @@ QString textureDirStr(); DLLEXPORT QString iconDirStr(); +/// Returns the Path to Fonts +DLLEXPORT +QString fontsDirStr(); + /// Sets the base Path of the application DLLEXPORT void applicationDir(QDir _dir); @@ -122,6 +130,10 @@ void textureDir(QDir _dir); DLLEXPORT void iconDir(QDir _dir); +/// Sets the Path to the Fonts +DLLEXPORT +void fontsDir(QDir _dir); + /// Sets the base Path of the application DLLEXPORT bool applicationDir(QString _dir); @@ -142,6 +154,10 @@ bool textureDir(QString _dir); DLLEXPORT bool iconDir(QString _dir); +/// Sets the Path to the Fonts +DLLEXPORT +void fontsDir(QDir _dir); + //=========================================================================== /** @name Option files / paths