Fix text ellipsis not implemented in Tibetan
The original code checks the existence of an ellipsis character first.If this does not exist (glyph == 0,which is an invalid glyph index), then it falls back to looking up '.'. But in the Tibetan environment,the glyphIndex('.') also returns 0, so that it simply doesn't add any form of "...", and cuts the text instead. If both the attempts at getting something from the main font fails, we can do a third pass on the "multi" font engine. Fixes: QTBUG-95942 Pick-to: 6.1 6.2 Done-with: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Change-Id: I251de3fe92e19be0462c58c2059ecf7d354bfbb0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
6e9cae0b77
commit
586d9e6013
@ -3095,6 +3095,11 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
|
||||
|
||||
ellipsisWidth *= 3;
|
||||
ellipsisText = QStringLiteral("...");
|
||||
} else {
|
||||
engine = fnt.d->engineForScript(QChar::Script_Common);
|
||||
glyph = engine->glyphIndex(ellipsisChar.unicode());
|
||||
engine->recalcAdvances(&glyphs, { });
|
||||
ellipsisText = ellipsisChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user