Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 7, 11, 12
-
Fix Version/s: 12
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:b14
Description
I just happened to notice that in freetypeScaler.c we have
calls to FT_Get_Char_Index(..) which
(a) return values that are never used
(b) it is just as well since the values would be bogus anyway
The fn is used to get a glyph code from a char code but these
calls are passing in a glyph code to begin with.
They have been in the source since it was first written in 2007 ..
hg annotate freetypeScaler.c | grep glyph_index
0: int glyph_index;
0: glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
0: int glyph_index;
0: glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
We can just delete these lines.
calls to FT_Get_Char_Index(..) which
(a) return values that are never used
(b) it is just as well since the values would be bogus anyway
The fn is used to get a glyph code from a char code but these
calls are passing in a glyph code to begin with.
They have been in the source since it was first written in 2007 ..
hg annotate freetypeScaler.c | grep glyph_index
0: int glyph_index;
0: glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
0: int glyph_index;
0: glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
We can just delete these lines.