From 678e427948e03119e7496192d26facc7d94e9d16 Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Fri, 18 Mar 2016 11:44:41 -0400 Subject: 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 --- tools/configure/configureapp.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'tools') 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(); -- cgit v1.2.3