QTBF: fix the mandatory line breaks not being set in some cases
e.g. for the text "Aaa bbb ccc.\r\nDdd eee fff." the \r\n wasn't treated as a hard line break or as a line break opportunity, ever. Quite ancient bug... Change-Id: I8d8497c55a3a4d51c27de99ccfe1e31f3bf4de77 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
32c39330ef
commit
a9b30841b9
@ -188,10 +188,11 @@ static void calcGraphemeAndLineBreaks(const ushort *string, quint32 len, HB_Char
|
|||||||
attributes[i].whiteSpace = true;
|
attributes[i].whiteSpace = true;
|
||||||
|
|
||||||
HB_LineBreakType lineBreakType = HB_NoBreak;
|
HB_LineBreakType lineBreakType = HB_NoBreak;
|
||||||
if (cls >= QUnicodeTables::LineBreak_LF) {
|
|
||||||
lineBreakType = HB_ForcedBreak;
|
if (cls >= QUnicodeTables::LineBreak_CR) {
|
||||||
} else if (cls == QUnicodeTables::LineBreak_CR) {
|
if (cls > QUnicodeTables::LineBreak_CR || ncls != QUnicodeTables::LineBreak_LF)
|
||||||
lineBreakType = (ncls == QUnicodeTables::LineBreak_LF) ? HB_NoBreak : HB_ForcedBreak;
|
lineBreakType = HB_ForcedBreak;
|
||||||
|
goto next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ncls == QUnicodeTables::LineBreak_SP)
|
if (ncls == QUnicodeTables::LineBreak_SP)
|
||||||
|
Loading…
Reference in New Issue
Block a user