diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-03-02 01:52:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-02 23:26:49 +0100 |
commit | 4c7082162dd2192f535c1e524f966199883f53db (patch) | |
tree | 5896f151f91bf91e292af7fe560d72a3c4587b2a /src/plugins/platforms/windows/qwindowsfontengine.cpp | |
parent | 5cd7390ba91702efb2a978a438896d713f5a3abc (diff) |
Unify QFontEngine::getSfntTableData() behavior on all platforms
Being a most significant method in the font API,
getSfntTableData() must behave in exactly the same way on all platforms.
Briefly, it must return true if the table exists in the font,
despite the other params, and always stores the table data length
in 'length' param, thus reporting the amount of bytes actually
needed to store the table data in a buffer.
Change-Id: I7a15465020c1ea818ea46a05ea3b9b7e1cd60d14
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 86fcb666b0..79615e79ec 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -1032,6 +1032,7 @@ bool QWindowsFontEngine::getSfntTableData(uint tag, uchar *buffer, uint *length) SelectObject(hdc, hfont); DWORD t = qbswap<quint32>(tag); *length = GetFontData(hdc, t, 0, buffer, *length); + Q_ASSERT(*length == GDI_ERROR || int(*length) > 0); return *length != GDI_ERROR; } |