summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJosh Faust <jfaust@suitabletech.com>2013-03-08 16:06:00 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 17:23:47 +0100
commitebd8ca146db023143d32ca6cba68b813b9e3da0b (patch)
treefb3f0eeb763c4b87f21bc37d2e1fc153b569910b /src/gui
parentcc58912acd497ec0b75ae63e987f6bd66b35f86d (diff)
Fix size of HB_FontRec in qharfbuzz_copy_p.h
HB_FontRec was defined in qharfbuzz_copy_p.h as a void* typedef, which is incorrect, and is the wrong size. This caused things accessing QFontEngine data after an HB_FontRec to read from the wrong offset. The visible consequence of this was incorrect text rendering in OpenGL in Linux. Task-number: QTBUG-29966 Change-Id: I71e6a6c5b4ef7b2c8a92631d2b9540537afc56b1 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qharfbuzz_copy_p.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h
index 34acca3f9a..7225ff7717 100644
--- a/src/gui/text/qharfbuzz_copy_p.h
+++ b/src/gui/text/qharfbuzz_copy_p.h
@@ -69,8 +69,9 @@ typedef enum {
typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph;
typedef void * HB_Font;
typedef void * HB_Face;
-typedef void * HB_FontRec;
typedef QT_PREPEND_NAMESPACE(quint32) hb_uint32;
+typedef QT_PREPEND_NAMESPACE(quint16) HB_UShort;
+typedef QT_PREPEND_NAMESPACE(qint32) HB_16Dot16;
typedef QT_PREPEND_NAMESPACE(qint32) HB_Fixed;
typedef struct {
@@ -88,6 +89,16 @@ typedef struct {
hb_bitfield combiningClass :8;
} HB_GlyphAttributes;
+typedef struct HB_Font_ {
+ const void *klass;
+
+ /* Metrics */
+ HB_UShort x_ppem, y_ppem;
+ HB_16Dot16 x_scale, y_scale;
+
+ void *userData;
+} HB_FontRec;
+
}
#endif // ifdef QT_BUILD_GUI_LIB