8209548: Unused and incorrect calls to FT_Get_Char_Index
authorprr
Mon, 24 Sep 2018 11:49:25 -0700
changeset 51932 c38095007004
parent 51931 f2d6750f5c10
child 51933 4ec74929fbfe
8209548: Unused and incorrect calls to FT_Get_Char_Index Reviewed-by: psadhukhan, kaddepalli
src/java.desktop/share/native/libfontmanager/freetypeScaler.c
--- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Mon Sep 24 11:46:40 2018 -0700
+++ b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Mon Sep 24 11:49:25 2018 -0700
@@ -679,7 +679,6 @@
     int error, imageSize;
     UInt16 width, height;
     GlyphInfo *glyphInfo;
-    int glyph_index;
     int renderFlags = FT_LOAD_RENDER, target;
     FT_GlyphSlot ftglyph;
 
@@ -720,8 +719,6 @@
     }
     renderFlags |= target;
 
-    glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
-
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
     if (error) {
         //do not destroy scaler yet.
@@ -958,7 +955,6 @@
         FTScalerContext *context, FTScalerInfo* scalerInfo,
         jint glyphCode, jfloat xpos, jfloat ypos) {
     int renderFlags;
-    int glyph_index;
     FT_Error error;
     FT_GlyphSlot ftglyph;
 
@@ -974,8 +970,6 @@
 
     renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
 
-    glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
-
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
     if (error) {
         return NULL;