diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-02-03 20:38:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-04 13:37:14 +0100 |
commit | 19463c5c3f4b5b25eff557c813d6e6975ebc2491 (patch) | |
tree | b67027716972882ab23379586bee705326739783 /src/gui/text/qfontengine_qpa.cpp | |
parent | 2edf3ba5a718415e5a9a327156289bed4484cdea (diff) |
Fix character mirroring issue with HarfBuzz-NG
HarfBuzz-NG does character mirroring where appropriate.
A simple solution is to unset RightToLeft shaper flag when
text gets shaped with HB-NG. Instead, move the mirroring code
right to HB-old proxy function and decrease code duplication.
Change-Id: Icdcd50b73b3e6a43da4b85addc7d8f51edf86512
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qfontengine_qpa.cpp')
-rw-r--r-- | src/gui/text/qfontengine_qpa.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index 46f9071f07..cb40a5388a 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -353,13 +353,10 @@ bool QFontEngineQPA::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph const uchar *cmap = externalCMap ? externalCMap : (fontData + cmapOffset); - bool mirrored = flags & QFontEngine::RightToLeft; int glyph_pos = 0; 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); @@ -368,8 +365,6 @@ bool QFontEngineQPA::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph } else { 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 0 && defined(DEBUG_FONTENGINE) QChar c(uc); |