summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/configure/configureapp.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3be0ea2b7c..a03be4df0a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -264,6 +264,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
dictionary[ "LIBJPEG" ] = "auto";
dictionary[ "LIBPNG" ] = "auto";
dictionary[ "FREETYPE" ] = "yes";
+ dictionary[ "FREETYPE_FROM" ] = "default";
dictionary[ "HARFBUZZ" ] = "qt";
dictionary[ "ACCESSIBILITY" ] = "yes";
@@ -634,12 +635,16 @@ void Configure::parseCmdLine()
}
// Text Rendering --------------------------------------------
- else if (configCmdLine.at(i) == "-no-freetype")
+ else if (configCmdLine.at(i) == "-no-freetype") {
dictionary[ "FREETYPE" ] = "no";
- else if (configCmdLine.at(i) == "-qt-freetype")
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ } else if (configCmdLine.at(i) == "-qt-freetype") {
dictionary[ "FREETYPE" ] = "yes";
- else if (configCmdLine.at(i) == "-system-freetype")
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ } else if (configCmdLine.at(i) == "-system-freetype") {
dictionary[ "FREETYPE" ] = "system";
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ }
else if (configCmdLine.at(i) == "-no-harfbuzz")
dictionary[ "HARFBUZZ" ] = "no";
@@ -2588,6 +2593,9 @@ void Configure::autoDetection()
if (dictionary["FONT_CONFIG"] == "auto")
dictionary["FONT_CONFIG"] = checkAvailability("FONT_CONFIG") ? "yes" : "no";
+ if ((dictionary["FONT_CONFIG"] == "yes") && (dictionary["FREETYPE_FROM"] == "default"))
+ dictionary["FREETYPE"] = "system";
+
if (dictionary["DIRECTWRITE"] == "auto")
dictionary["DIRECTWRITE"] = checkAvailability("DIRECTWRITE") ? "yes" : "no";
@@ -2717,6 +2725,22 @@ bool Configure::verifyConfiguration()
}
}
+ if ((dictionary["FONT_CONFIG"] == "yes") && (dictionary["FREETYPE_FROM"] == "commandline")) {
+ if (dictionary["FREETYPE"] == "yes") {
+ cout << "WARNING: Bundled FreeType can't be used."
+ " FontConfig use requires system FreeType." << endl;
+ dictionary["FREETYPE"] = "system";
+ dictionary["FREETYPE_FROM"] = "override";
+ prompt = true;
+ } else if (dictionary["FREETYPE"] == "no") {
+ cout << "WARNING: FreeType can't be disabled."
+ " FontConfig use requires system FreeType." << endl;
+ dictionary["FREETYPE"] = "system";
+ dictionary["FREETYPE_FROM"] = "override";
+ prompt = true;
+ }
+ }
+
if (prompt)
promptKeyPress();