Adjust FreeType choice made by configureapp

FontConfig requires FreeType, so choosing the system FontConfig (there
isn't a bundled FontConfig) means that the system FreeType must be used.
QNX ended up configured to include the bundled FreeType and the system
FontConfig which produced a fault when bundled FreeType structures got
passed through FontConfig to the system FreeType.

Task-number: QTBUG-52578
Task-number: QTBUG-51417
Change-Id: I56add73d34320c1d08f63b57cb0fef1ba06264e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
James McDonnell 2016-03-18 11:44:41 -04:00
parent d179931ada
commit 678e427948

View File

@ -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();