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>
This commit is contained in:
Konstantin Ritt 2014-03-05 09:34:57 +02:00 committed by The Qt Project
parent 3f6a554d21
commit 94d0f7c3d3

View File

@ -335,10 +335,14 @@ QFontEngineQPA::~QFontEngineQPA()
bool QFontEngineQPA::getSfntTableData(uint tag, uchar *buffer, uint *length) const bool QFontEngineQPA::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{ {
Q_UNUSED(tag); if (tag != MAKE_TAG('c', 'm', 'a', 'p') || !cmap)
Q_UNUSED(buffer);
*length = 0;
return false; 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 glyph_t QFontEngineQPA::glyphIndex(uint ucs4) const