changeset 4953:55316c1ad394

RT-32674: Win: Fatal JNI error in DirectWrite code
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Tue, 03 Sep 2013 15:38:51 -0700
parents 977346aedf74
children 57a0f2653086
files modules/graphics/src/main/native-font/directwrite.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/native-font/directwrite.cpp	Tue Sep 03 14:47:11 2013 -0700
+++ b/modules/graphics/src/main/native-font/directwrite.cpp	Tue Sep 03 15:38:51 2013 -0700
@@ -204,7 +204,7 @@
     lpStruct->fontFace = (IDWriteFontFace *)env->GetLongField(lpObject, DWRITE_GLYPH_RUNFc.fontFace);
     lpStruct->fontEmSize = env->GetFloatField(lpObject, DWRITE_GLYPH_RUNFc.fontEmSize);
     ((jshort*)lpStruct->glyphIndices)[0] = env->GetShortField(lpObject, DWRITE_GLYPH_RUNFc.glyphIndices);
-    ((float*)lpStruct->glyphAdvances)[0] = env->GetShortField(lpObject, DWRITE_GLYPH_RUNFc.glyphAdvances);
+    ((float*)lpStruct->glyphAdvances)[0] = env->GetFloatField(lpObject, DWRITE_GLYPH_RUNFc.glyphAdvances);
     ((float)lpStruct->glyphOffsets[0].advanceOffset) = env->GetFloatField(lpObject, DWRITE_GLYPH_RUNFc.advanceOffset);
     ((float)lpStruct->glyphOffsets[0].ascenderOffset) = env->GetFloatField(lpObject, DWRITE_GLYPH_RUNFc.ascenderOffset);
     lpStruct->isSideways = env->GetBooleanField(lpObject, DWRITE_GLYPH_RUNFc.isSideways);