Make HarfBuzz-NG the default shaper on all platforms
[ChangeLog][Important Behavior Changes] HarfBuzz-NG is now the default shaper on all platforms. This results in a better shaping results for various languages, better performance, and lower memory consumption. Task-number: QTBUG-18980 Change-Id: I4d9454fc37e9050873df3857e52369dfc7f191b2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
2e2374a226
commit
7304c9a4e8
39
configure
vendored
39
configure
vendored
@ -617,7 +617,7 @@ CFG_EGL=auto
|
|||||||
CFG_EGL_X=auto
|
CFG_EGL_X=auto
|
||||||
CFG_FONTCONFIG=auto
|
CFG_FONTCONFIG=auto
|
||||||
CFG_FREETYPE=auto
|
CFG_FREETYPE=auto
|
||||||
CFG_HARFBUZZ=auto
|
CFG_HARFBUZZ=qt
|
||||||
CFG_SQL_AVAILABLE=
|
CFG_SQL_AVAILABLE=
|
||||||
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
||||||
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
||||||
@ -2357,13 +2357,14 @@ Third Party Libraries:
|
|||||||
+ -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active).
|
+ -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active).
|
||||||
See http://www.freetype.org
|
See http://www.freetype.org
|
||||||
|
|
||||||
* -no-harfbuzz ....... Do not compile HarfBuzz-NG support.
|
-no-harfbuzz ....... Do not compile HarfBuzz-NG support.
|
||||||
-qt-harfbuzz ....... (experimental) Use HarfBuzz-NG bundled with Qt
|
* -qt-harfbuzz ....... Use HarfBuzz-NG bundled with Qt to do text shaping.
|
||||||
|
It can still be disabled by setting
|
||||||
|
the QT_HARFBUZZ environment variable to "old".
|
||||||
|
-system-harfbuzz ... Use HarfBuzz-NG from the operating system
|
||||||
to do text shaping. It can still be disabled
|
to do text shaping. It can still be disabled
|
||||||
by setting QT_HARFBUZZ environment variable to "old".
|
by setting the QT_HARFBUZZ environment variable to "old".
|
||||||
-system-harfbuzz ... (experimental) Use HarfBuzz-NG from the operating system
|
See http://www.harfbuzz.org
|
||||||
to do text shaping. It can still be disabled
|
|
||||||
by setting QT_HARFBUZZ environment variable to "old".
|
|
||||||
|
|
||||||
-no-openssl ........ Do not compile support for OpenSSL.
|
-no-openssl ........ Do not compile support for OpenSSL.
|
||||||
+ -openssl ........... Enable run-time OpenSSL support.
|
+ -openssl ........... Enable run-time OpenSSL support.
|
||||||
@ -5301,18 +5302,22 @@ if [ "$CFG_FREETYPE" = "auto" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# harfbuzz support
|
# harfbuzz support
|
||||||
[ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=yes
|
if [ "$CFG_HARFBUZZ" = "system" ]; then
|
||||||
[ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=no # disable auto-detection on non-Mac for now
|
if ! compileTest unix/harfbuzz "HarfBuzz"; then
|
||||||
if [ "$CFG_HARFBUZZ" = "auto" ]; then
|
if [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
||||||
if compileTest unix/harfbuzz "HarfBuzz"; then
|
echo " HarfBuzz system library support cannot be enabled due to functionality tests!"
|
||||||
CFG_HARFBUZZ=system
|
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
||||||
else
|
echo " If you believe this message is in error you may use the continue"
|
||||||
CFG_HARFBUZZ=yes
|
echo " switch (-continue) to $0 to continue."
|
||||||
|
exit 101
|
||||||
|
else
|
||||||
|
CFG_HARFBUZZ=qt
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$XPLATFORM_MAC" = "yes" -a "$CFG_HARFBUZZ" = "system" ]; then
|
if [ "$XPLATFORM_MAC" = "yes" -a "$CFG_HARFBUZZ" != "qt" ]; then
|
||||||
echo
|
echo
|
||||||
echo "WARNING: AAT is not supported with -system-harfbuzz on Mac OS X."
|
echo "WARNING: On OS X, AAT is supported only with -qt-harfbuzz."
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -6542,7 +6547,7 @@ report_support " FontConfig ............." "$CFG_FONTCONFIG"
|
|||||||
report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy"
|
report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy"
|
||||||
report_support " Glib ..................." "$CFG_GLIB"
|
report_support " Glib ..................." "$CFG_GLIB"
|
||||||
report_support " GTK theme .............." "$CFG_QGTKSTYLE"
|
report_support " GTK theme .............." "$CFG_QGTKSTYLE"
|
||||||
report_support " HarfBuzz ..............." "$CFG_HARFBUZZ"
|
report_support " HarfBuzz ..............." "$CFG_HARFBUZZ" system "system library" qt "bundled copy"
|
||||||
report_support " Iconv .................." "$CFG_ICONV"
|
report_support " Iconv .................." "$CFG_ICONV"
|
||||||
report_support " ICU ...................." "$CFG_ICU"
|
report_support " ICU ...................." "$CFG_ICU"
|
||||||
report_support " Image formats:"
|
report_support " Image formats:"
|
||||||
|
@ -1105,9 +1105,8 @@ void tst_QTextScriptEngine::mirroredChars()
|
|||||||
|
|
||||||
void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
|
void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QSKIP("Result differs for HarfBuzz-NG, skip test.");
|
QSKIP("Result differs for HarfBuzz-NG, skip test.");
|
||||||
#endif
|
|
||||||
QFontDatabase db;
|
QFontDatabase db;
|
||||||
if (!db.families().contains(QStringLiteral("Aparajita")))
|
if (!db.families().contains(QStringLiteral("Aparajita")))
|
||||||
QSKIP("couldn't find 'Aparajita' font");
|
QSKIP("couldn't find 'Aparajita' font");
|
||||||
@ -1146,9 +1145,7 @@ void tst_QTextScriptEngine::combiningMarks_qtbug15675_data()
|
|||||||
QTest::addColumn<QFont>("font");
|
QTest::addColumn<QFont>("font");
|
||||||
QTest::addColumn<QString>("string");
|
QTest::addColumn<QString>("string");
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QSKIP("Result differs for HarfBuzz-NG, skip test.");
|
QSKIP("Result differs for HarfBuzz-NG, skip test.");
|
||||||
#endif
|
|
||||||
|
|
||||||
bool hasTests = false;
|
bool hasTests = false;
|
||||||
|
|
||||||
@ -1273,23 +1270,15 @@ void tst_QTextScriptEngine::thaiWithZWJ()
|
|||||||
QCOMPARE(logClusters[i], ushort(i));
|
QCOMPARE(logClusters[i], ushort(i));
|
||||||
QCOMPARE(logClusters[15], ushort(0));
|
QCOMPARE(logClusters[15], ushort(0));
|
||||||
QCOMPARE(logClusters[16], ushort(0));
|
QCOMPARE(logClusters[16], ushort(0));
|
||||||
#ifndef Q_OS_MAC
|
|
||||||
// ### Result differs for HarfBuzz-NG
|
|
||||||
QCOMPARE(logClusters[17], ushort(1));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A thai implementation could either remove the ZWJ and ZWNJ characters, or hide them.
|
// A thai implementation could either remove the ZWJ and ZWNJ characters, or hide them.
|
||||||
// The current implementation hides them, so we test for that.
|
// The current implementation hides them, so we test for that.
|
||||||
// The only characters that we should be hiding are the ZWJ and ZWNJ characters in position 1 and 3.
|
// The only characters that we should be hiding are the ZWJ and ZWNJ characters in position 1 and 3.
|
||||||
const QGlyphLayout glyphLayout = e->layoutData->glyphLayout;
|
const QGlyphLayout glyphLayout = e->layoutData->glyphLayout;
|
||||||
for (int i = 0; i < 18; i++) {
|
for (int i = 0; i < 18; i++) {
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
// ### Result differs for HarfBuzz-NG
|
|
||||||
if (i == 17)
|
if (i == 17)
|
||||||
QCOMPARE(glyphLayout.advances[i].toInt(), 0);
|
QCOMPARE(glyphLayout.advances[i].toInt(), 0);
|
||||||
else
|
else if (i == 1 || i == 3)
|
||||||
#endif
|
|
||||||
if (i == 1 || i == 3)
|
|
||||||
QCOMPARE(glyphLayout.advances[i].toInt(), 0);
|
QCOMPARE(glyphLayout.advances[i].toInt(), 0);
|
||||||
else
|
else
|
||||||
QVERIFY(glyphLayout.advances[i].toInt() != 0);
|
QVERIFY(glyphLayout.advances[i].toInt() != 0);
|
||||||
|
@ -268,7 +268,7 @@ Configure::Configure(int& argc, char** argv)
|
|||||||
dictionary[ "LIBJPEG" ] = "auto";
|
dictionary[ "LIBJPEG" ] = "auto";
|
||||||
dictionary[ "LIBPNG" ] = "auto";
|
dictionary[ "LIBPNG" ] = "auto";
|
||||||
dictionary[ "FREETYPE" ] = "yes";
|
dictionary[ "FREETYPE" ] = "yes";
|
||||||
dictionary[ "HARFBUZZ" ] = "no";
|
dictionary[ "HARFBUZZ" ] = "qt";
|
||||||
|
|
||||||
dictionary[ "ACCESSIBILITY" ] = "yes";
|
dictionary[ "ACCESSIBILITY" ] = "yes";
|
||||||
dictionary[ "OPENGL" ] = "yes";
|
dictionary[ "OPENGL" ] = "yes";
|
||||||
@ -607,7 +607,7 @@ void Configure::parseCmdLine()
|
|||||||
else if (configCmdLine.at(i) == "-no-harfbuzz")
|
else if (configCmdLine.at(i) == "-no-harfbuzz")
|
||||||
dictionary[ "HARFBUZZ" ] = "no";
|
dictionary[ "HARFBUZZ" ] = "no";
|
||||||
else if (configCmdLine.at(i) == "-qt-harfbuzz")
|
else if (configCmdLine.at(i) == "-qt-harfbuzz")
|
||||||
dictionary[ "HARFBUZZ" ] = "yes";
|
dictionary[ "HARFBUZZ" ] = "qt";
|
||||||
else if (configCmdLine.at(i) == "-system-harfbuzz")
|
else if (configCmdLine.at(i) == "-system-harfbuzz")
|
||||||
dictionary[ "HARFBUZZ" ] = "system";
|
dictionary[ "HARFBUZZ" ] = "system";
|
||||||
|
|
||||||
@ -1911,12 +1911,13 @@ bool Configure::displayHelp()
|
|||||||
desc("FREETYPE", "system","-system-freetype", "Use the libfreetype provided by the system.");
|
desc("FREETYPE", "system","-system-freetype", "Use the libfreetype provided by the system.");
|
||||||
|
|
||||||
desc("HARFBUZZ", "no", "-no-harfbuzz", "Do not compile in HarfBuzz-NG support.");
|
desc("HARFBUZZ", "no", "-no-harfbuzz", "Do not compile in HarfBuzz-NG support.");
|
||||||
desc("HARFBUZZ", "yes", "-qt-harfbuzz", "(experimental) Use HarfBuzz-NG bundled with Qt\n"
|
desc("HARFBUZZ", "qt", "-qt-harfbuzz", "Use HarfBuzz-NG bundled with Qt to do text shaping.\n"
|
||||||
|
"It can still be disabled by setting\n"
|
||||||
|
"the QT_HARFBUZZ environment variable to \"old\".");
|
||||||
|
desc("HARFBUZZ", "system","-system-harfbuzz", "Use HarfBuzz-NG from the operating system\n"
|
||||||
"to do text shaping. It can still be disabled\n"
|
"to do text shaping. It can still be disabled\n"
|
||||||
"by setting QT_HARFBUZZ environment variable to \"old\".");
|
"by setting the QT_HARFBUZZ environment variable to \"old\".\n"
|
||||||
desc("HARFBUZZ", "system","-system-harfbuzz", "(experimental) Use HarfBuzz-NG from the operating system\n"
|
"See http://www.harfbuzz.org\n");
|
||||||
"to do text shaping. It can still be disabled\n"
|
|
||||||
"by setting QT_HARFBUZZ environment variable to \"old\".\n");
|
|
||||||
|
|
||||||
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
|
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
|
||||||
desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
|
desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
|
||||||
@ -2696,7 +2697,7 @@ void Configure::generateOutputVars()
|
|||||||
else if (dictionary[ "FREETYPE" ] == "system")
|
else if (dictionary[ "FREETYPE" ] == "system")
|
||||||
qtConfig += "system-freetype";
|
qtConfig += "system-freetype";
|
||||||
|
|
||||||
if (dictionary[ "HARFBUZZ" ] == "yes")
|
if (dictionary[ "HARFBUZZ" ] == "qt")
|
||||||
qtConfig += "harfbuzz";
|
qtConfig += "harfbuzz";
|
||||||
else if (dictionary[ "HARFBUZZ" ] == "system")
|
else if (dictionary[ "HARFBUZZ" ] == "system")
|
||||||
qtConfig += "system-harfbuzz";
|
qtConfig += "system-harfbuzz";
|
||||||
@ -3700,7 +3701,7 @@ void Configure::displayConfig()
|
|||||||
sout << " PNG support............." << dictionary[ "PNG" ] << endl;
|
sout << " PNG support............." << dictionary[ "PNG" ] << endl;
|
||||||
sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl;
|
sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl;
|
||||||
sout << " Fontconfig support......" << dictionary[ "FONT_CONFIG" ] << endl;
|
sout << " Fontconfig support......" << dictionary[ "FONT_CONFIG" ] << endl;
|
||||||
sout << " HarfBuzz-NG support....." << dictionary[ "HARFBUZZ" ] << endl;
|
sout << " HarfBuzz support........" << dictionary[ "HARFBUZZ" ] << endl;
|
||||||
sout << " PCRE support............" << dictionary[ "PCRE" ] << endl;
|
sout << " PCRE support............" << dictionary[ "PCRE" ] << endl;
|
||||||
sout << " ICU support............." << dictionary[ "ICU" ] << endl;
|
sout << " ICU support............." << dictionary[ "ICU" ] << endl;
|
||||||
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
|
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user