From 9afb02412eadc567e82a0aca10c6401937d213e9 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 13 Nov 2014 13:00:11 +0100 Subject: Revert "Fix fallbacks for adapted common script" This reverts 1dd9a0af4f577ccb5578cea562a98686c8e290e6. It was a band-aid for a change in the unicode itemizing algorithm which caused the script of a script item to become unreliable. This change has since been reverted, so the band-aid is no longer needed, and it also causes problems for WebKit on Windows when it ends up preferring Arial Unicode MS as the font for Uchen script, even though the font does not support this script. The autotest from the reverted commit is kept in place and still passes. [ChangeLog][Text] Fixed regression when rendering Uchen text in WebKit on Windows. Change-Id: I488c84703bb55a050d90092c6bf9e5c70a9e31c2 Task-number: QTBUG-41372 Reviewed-by: Allan Sandfeld Jensen --- src/gui/text/qfontengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 6a34a4c117..52e10bd717 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -2037,7 +2037,7 @@ void QFontEngineMultiBasicImpl::loadEngine(int at) request.family = fallbackFamilies.at(at-1); engines[at] = QFontDatabase::findFont(script, /*fontprivate = */0, - request, /*multi = */false, true); + request, /*multi = */false); Q_ASSERT(engines[at]); engines[at]->ref.ref(); engines[at]->fontDef = request; -- cgit v1.2.3 From 0600f7d6299a21014f1b72d54fc6b23c02693204 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 14 Nov 2014 14:15:04 +0400 Subject: Fix hb_face leaking in QFontEngineFT Since HarfBuzz-old's HB_Face doesn't support ref-counting, it is impossible to keep the same behavior as for NG's ref-counted hb_face when we're going to reparent the data of unknown type in QFontEngineFT. We should either not release the object returned by harfbuzzFace(), or introduce ref-counting for HB-old's HB_Face. Stop referencing HB-NG's objects on access for now and thus avoid a need to release them manually. Task-number: QTBUG-42674 Change-Id: Ia21e7ba9c17185796b0dd98c2c27d02566f2a701 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengine.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 52e10bd717..0b517fbf29 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -373,8 +373,6 @@ bool QFontEngine::supportsScript(QChar::Script script) const if (!ret && script_tag_2 != HB_OT_TAG_DEFAULT_SCRIPT) ret = hb_ot_layout_table_find_script(face, HB_OT_TAG_GSUB, HB_OT_TAG_DEFAULT_SCRIPT, &script_index); } - - hb_face_destroy(face); } return ret; } -- cgit v1.2.3 From 4fec31dcc003ccd107b447b2ee86dab1eedae642 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 22 Nov 2014 17:09:08 -0800 Subject: Fix failure to build QtQuick with LTO The presence of the inline QTestFontEngine's constructor causes a linker failure because QFontEngineBox isn't exported. I'd say this is a compiler bug (GCC 4.9), but it's an easy workaround and a difficult testcase. typeinfo for QTestFontEngine: error: undefined reference to 'typeinfo for QFontEngineBox' vtable for QTestFontEngine: error: undefined reference to 'QFontEngineBox::glyphIndex(unsigned int) const' Change-Id: I84829d111616977d6f3fcbbb48509d1c7d4f5fa6 Reviewed-by: Konstantin Ritt --- src/gui/text/qfontengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 0b517fbf29..b2a7a8e91f 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -2105,4 +2105,8 @@ QFontEngine* QFontEngineMultiBasicImpl::createMultiFontEngine(QFontEngine *fe, i return engine; } +QTestFontEngine::QTestFontEngine(int size) + : QFontEngineBox(TestFontEngine, size) +{} + QT_END_NAMESPACE -- cgit v1.2.3