8209548: Unused and incorrect calls to FT_Get_Char_Index
Reviewed-by: psadhukhan, kaddepalli
This commit is contained in:
parent
3a2ece353b
commit
7d0d9047ac
@ -679,7 +679,6 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative(
|
|||||||
int error, imageSize;
|
int error, imageSize;
|
||||||
UInt16 width, height;
|
UInt16 width, height;
|
||||||
GlyphInfo *glyphInfo;
|
GlyphInfo *glyphInfo;
|
||||||
int glyph_index;
|
|
||||||
int renderFlags = FT_LOAD_RENDER, target;
|
int renderFlags = FT_LOAD_RENDER, target;
|
||||||
FT_GlyphSlot ftglyph;
|
FT_GlyphSlot ftglyph;
|
||||||
|
|
||||||
@ -720,8 +719,6 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative(
|
|||||||
}
|
}
|
||||||
renderFlags |= target;
|
renderFlags |= target;
|
||||||
|
|
||||||
glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
|
|
||||||
|
|
||||||
error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
|
error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
|
||||||
if (error) {
|
if (error) {
|
||||||
//do not destroy scaler yet.
|
//do not destroy scaler yet.
|
||||||
@ -958,7 +955,6 @@ static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
|
|||||||
FTScalerContext *context, FTScalerInfo* scalerInfo,
|
FTScalerContext *context, FTScalerInfo* scalerInfo,
|
||||||
jint glyphCode, jfloat xpos, jfloat ypos) {
|
jint glyphCode, jfloat xpos, jfloat ypos) {
|
||||||
int renderFlags;
|
int renderFlags;
|
||||||
int glyph_index;
|
|
||||||
FT_Error error;
|
FT_Error error;
|
||||||
FT_GlyphSlot ftglyph;
|
FT_GlyphSlot ftglyph;
|
||||||
|
|
||||||
@ -974,8 +970,6 @@ static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
|
|||||||
|
|
||||||
renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
|
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);
|
error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
|
||||||
if (error) {
|
if (error) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user