8209548: Unused and incorrect calls to FT_Get_Char_Index

Reviewed-by: psadhukhan, kaddepalli
This commit is contained in:
Phil Race 2018-09-24 11:49:25 -07:00
parent 3a2ece353b
commit 7d0d9047ac

View File

@ -679,7 +679,6 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative(
int error, imageSize;
UInt16 width, height;
GlyphInfo *glyphInfo;
int glyph_index;
int renderFlags = FT_LOAD_RENDER, target;
FT_GlyphSlot ftglyph;
@ -720,8 +719,6 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative(
}
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 @@ static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
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 @@ static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
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;