A step out from Harfbuzz (reduce dependency)
authorKonstantin Ritt <ritt.ks@gmail.com>
Sun, 26 Aug 2012 01:09:09 +0000 (04:09 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 21 Sep 2012 22:47:40 +0000 (00:47 +0200)
commitceb9a8232ca0fe9bc823b61ee3ca8bcdc0aa01c5
treed088f6fa8e4025b75ddd034240c74fb987fd7ebe
parented5fe1b95e818101d00e9415d8881ac836c505eb
A step out from Harfbuzz (reduce dependency)

Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt
(in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm
which has been moved from HB to Qt (well, most of it)).
Rename some members to better reflect their meaning,
remember to keep HB_CharAttributes in sync with QCharAttributes.
Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct
that will be replaced with a more efficient/friendly solution a bit later.

The soft hyphen and the mandatory break detection has been factored out
of the default text breaking algorithm to a higher level in order to refactor
the QCharAttributes bitfields and to optimize the implementation for the common case.

Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
15 files changed:
src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
src/3rdparty/harfbuzz/src/harfbuzz-khmer.c
src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c
src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
src/3rdparty/harfbuzz/src/harfbuzz-thai.c
src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
src/corelib/tools/qharfbuzz_p.h
src/corelib/tools/qtextboundaryfinder.cpp
src/corelib/tools/qunicodetools.cpp
src/corelib/tools/qunicodetools_p.h
src/gui/text/qharfbuzz_copy_p.h
src/gui/text/qtextengine.cpp
src/gui/text/qtextengine_p.h
src/gui/text/qtextlayout.cpp
tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp