Fix crash for glyphs with height > 128
In fe97ecf408 we added support for
arbitrarily sized glyphs, since there is no guarantee that a glyph
will fit inside the em square. There was, however, a hardcoded max
size in the distance field generator, so for very tall glyphs we
could potentially get a crash.
[ChangeLog][QtGui][Text] Fixed crash for very tall glyphs
Task-number: QTBUG-57241
Change-Id: Id95c0f10d82a1294f7e7a51ac32e88a5a2e0a790
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
bb10
parent
1a5deb7e0e
commit
6965b8a592
|
|
@ -436,8 +436,8 @@ static void drawPolygons(qint32 *bits, int width, int height, const QPoint *vert
|
|||
const quint32 *indices, int indexCount, qint32 value)
|
||||
{
|
||||
Q_ASSERT(indexCount != 0);
|
||||
Q_ASSERT(height <= 128);
|
||||
QVarLengthArray<quint8, 16> scans[128];
|
||||
typedef QVarLengthArray<quint8, 16> ScanLine;
|
||||
QVarLengthArray<ScanLine, 128> scans(height);
|
||||
int first = 0;
|
||||
for (int i = 1; i < indexCount; ++i) {
|
||||
quint32 idx1 = indices[i - 1];
|
||||
|
|
|
|||
Loading…
Reference in New Issue