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

Unused and incorrect calls to FT_Get_Char_Index

    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:
      2d
    • 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: