changeset 12379:361582c06bc3

8074330: Set font anchors more solidly Reviewed-by: prr, srl, mschoene
author vadim
date Tue, 07 Apr 2015 13:37:30 +0300
parents 3c8a548c5def
children 43079a3873af
files src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 13:37:30 2015 +0300
+++ b/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 13:37:30 2015 +0300
@@ -97,13 +97,9 @@
 
     if( LE_FAILURE(success) ) { return 0; }
     Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]);
-    if (anchorTableOffset <= 0) {
-        // this means the table is mal-formed...
-        glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
-        return 0;
-    }
+    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
+    if( LE_FAILURE(success) ) { return 0; }
 
-    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
     LEPoint baseAnchor, markAdvance, pixels;