8209548: Unused and incorrect calls to FT_Get_Char_Index
Reviewed-by: psadhukhan, kaddepalli
--- 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;