Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8209548

Unused and incorrect calls to FT_Get_Char_Index

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 7, 11, 12
    • client-libs
    • 2d
    • b14

      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.

            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: