summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2010-04-21 10:27:04 (GMT)
committerAlessandro Portale <alessandro.portale@nokia.com>2010-04-21 10:27:04 (GMT)
commit9542c54a295d6151c467f106c43c3c15ff4653cd (patch)
tree372b43520a2b805a90c865a9dca81cf27869859d /src
parent69a32a4a4f209e098384159b8349a77cd1f4f7ce (diff)
downloadQt-9542c54a295d6151c467f106c43c3c15ff4653cd.zip
Qt-9542c54a295d6151c467f106c43c3c15ff4653cd.tar.gz
Qt-9542c54a295d6151c467f106c43c3c15ff4653cd.tar.bz2
Fix mirrored characters for RTL text in Symbian
For RTL text rendering (Arabic, Hebrew), we need certain characters to be mirrored, such as brackets. This patch fixes QFontEngineS60::stringToCMap to use QChar::mirroredChar for RTL text. Task-number: QT-3299 Reviewed-by: lars
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qfontengine_s60.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index c9ff661..1a99c93 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -221,9 +221,11 @@ bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout
HB_Glyph *g = glyphs->glyphs;
const unsigned char* cmap = m_extensions->cmap();
+ const bool isRtl = (flags & QTextEngine::RightToLeft);
for (int i = 0; i < len; ++i) {
const unsigned int uc = getChar(characters, i, len);
- *g++ = QFontEngine::getTrueTypeGlyphIndex(cmap, uc);
+ *g++ = QFontEngine::getTrueTypeGlyphIndex(cmap,
+ isRtl ? QChar::mirroredChar(uc) : uc);
}
glyphs->numGlyphs = g - glyphs->glyphs;