diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 22:48:31 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 22:48:31 (GMT) |
commit | f021a26114f599baf01db9bbe8dee5c2dece044e (patch) | |
tree | d9b40a3c6d43e69e6025c59eb02bc3ef7a13c947 /src/gui | |
parent | a17339e943f21bb6c6e16884f716dd9ab8f94938 (diff) | |
parent | 83a59e90ebf3aa2b8381f746a2c731426805b649 (diff) | |
download | Qt-f021a26114f599baf01db9bbe8dee5c2dece044e.zip Qt-f021a26114f599baf01db9bbe8dee5c2dece044e.tar.gz Qt-f021a26114f599baf01db9bbe8dee5c2dece044e.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Add unit tests covering most of QVector's API.
Fix crash when CoreText fails to shape text for us
Fix crash when using opengl graphicssystem on desktop
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qfontengine_mac.mm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 0bfdbc0..a6510cb 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -226,8 +226,19 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay QFixed *outAdvances_y = glyphs->advances_y; glyph_t *initialGlyph = outGlyphs; - if (arraySize == 0) - return false; + if (arraySize == 0) { + // CoreText failed to shape the text we gave it, so we assume one glyph + // per character and build a list of invalid glyphs with zero advance + *nglyphs = len; + for (int i = 0; i < len; ++i) { + outGlyphs[i] = 0; + logClusters[i] = i; + outAdvances_x[i] = QFixed(); + outAdvances_y[i] = QFixed(); + outAttributes[i].clusterStart = true; + } + return true; + } const bool rtl = (CTRunGetStatus(static_cast<CTRunRef>(CFArrayGetValueAtIndex(array, 0))) & kCTRunStatusRightToLeft); |