Avoid assert in QTextLayout for certain strings
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 8 May 2012 14:35:20 +0000 (16:35 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 May 2012 10:07:58 +0000 (12:07 +0200)
commit4b09230d97c7002d488b822648968ee89e8e1f9a
tree724de39434a751c2a2e9c94900fe259302912970
parent5ea4c3f148a5c293c5c5bb19866f8bfeabef7b38
Avoid assert in QTextLayout for certain strings

As in other shapers, we need to make sure that the default
attributes of the first character is set before doing the
greek-specific composition (which will set the attributes
for characters > 0). The effect of this would be that
the clusterStart did not default to true in the start of
the string, and we would get an unexpected situation
in addNextCluster() in QTextLayout which would cause an assert.

The example in the task, which combines a greek polytonic
(dasia-oxia: u1FDE) with a regular combining diacritic
(asterisk under: u0359), is not a correct string, but should
not cause an assert.

Task-number: QTBUG-22864
Change-Id: Ieaff3cccbd10abc634e95e9a79dcde4c48504a3c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/3rdparty/harfbuzz/src/harfbuzz-greek.c