diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-03-05 09:34:57 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-08 14:01:14 +0100 |
commit | 94d0f7c3d3b98b5b89bceffbf02a2114ca0f1339 (patch) | |
tree | 98f7ceb6460f1b961ea8a5c35a409ed4fb61df4e | |
parent | 3f6a554d21efad87c8d8502aac6e3c0f85b893d1 (diff) |
Make QFontEngineQPA report the TT 'cmap' table support
The QPF2 CMap is identical to the TrueType CMap table format.
Change-Id: I8c34d7c6a5942375538f3b8cb71d5a808b4fb400
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r-- | src/gui/text/qfontengine_qpa.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index 90c9cbb1bb..b17a8eb2db 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -335,10 +335,14 @@ QFontEngineQPA::~QFontEngineQPA() bool QFontEngineQPA::getSfntTableData(uint tag, uchar *buffer, uint *length) const { - Q_UNUSED(tag); - Q_UNUSED(buffer); - *length = 0; - return false; + if (tag != MAKE_TAG('c', 'm', 'a', 'p') || !cmap) + return false; + + if (buffer && int(*length) >= cmapSize) + memcpy(buffer, cmap, cmapSize); + *length = cmapSize; + Q_ASSERT(int(*length) > 0); + return true; } glyph_t QFontEngineQPA::glyphIndex(uint ucs4) const |