diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2010-08-23 10:56:50 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2010-09-02 09:55:35 (GMT) |
commit | 7f5cae532d9f1841d15f01064bf97775b9fd8b0d (patch) | |
tree | f80dfe54e14bce02f52d801270151e6ee4515331 /src/gui/text | |
parent | 4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4 (diff) | |
download | Qt-7f5cae532d9f1841d15f01064bf97775b9fd8b0d.zip Qt-7f5cae532d9f1841d15f01064bf97775b9fd8b0d.tar.gz Qt-7f5cae532d9f1841d15f01064bf97775b9fd8b0d.tar.bz2 |
Keep mirrored char handling consistent between some font engines
Mirrored character subsitution should be used in right-to-left text
direction unless the font is a symbol font. This patch will keep
this behavior consistent between FreeType, QPF and S60 font engines.
For Mac font engines, the shaping process is delegated to Core Text
or ATSUI, so we don't do mirrored char handling by ourselves.
Task-number: QTBUG-3852
Reviewed-by: Lars Knoll
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_qpf.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 60db8b6..a9b25f5 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1565,8 +1565,6 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs FT_Face face = freetype->face; for ( int i = 0; i < len; ++i ) { unsigned int uc = getChar(str, i, len); - if (mirrored) - uc = QChar::mirroredChar(uc); glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0; if ( !glyphs->glyphs[glyph_pos] ) { glyph_t glyph; diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index a0593cc..53b6910 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -578,8 +578,6 @@ bool QFontEngineQPF::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph if (symbol) { for (int i = 0; i < len; ++i) { unsigned int uc = getChar(str, i, len); - if (mirrored) - uc = QChar::mirroredChar(uc); glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc); if(!glyphs->glyphs[glyph_pos] && uc < 0x100) glyphs->glyphs[glyph_pos] = getTrueTypeGlyphIndex(cmap, uc + 0xf000); diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 2cc3f50..2c533db 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -256,7 +256,7 @@ bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout for (int i = 0; i < len; ++i) { const unsigned int uc = getChar(characters, i, len); *g++ = QFontEngine::getTrueTypeGlyphIndex(cmap, - isRtl ? QChar::mirroredChar(uc) : uc); + (isRtl && !m_symbolCMap) ? QChar::mirroredChar(uc) : uc); } glyphs->numGlyphs = g - glyphs->glyphs; |