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

Freetype bytecode interpreter override does not work

XMLWordPrintable

    • 2d
    • x86
    • linux_oracle_6.0

      ADDITIONAL SYSTEM INFORMATION :
      Any version above jdk-11.0.6+1
      JDK 8 is affected too.

      A DESCRIPTION OF THE PROBLEM :
      Environment variable does not override freetype interpreter version anymore

      REGRESSION : Last worked in version 11.0.6

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Start GUI app
      export FREETYPE_PROPERTIES="truetype:interpreter-version=40"
      Start GUI app again

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Font rendering changed
      ACTUAL -
      Font rendering does not change

      CUSTOMER SUBMITTED WORKAROUND :
      src/java.desktop/share/native/libfontmanager/freetypeScaler.c

      ```
          char* props = getenv("FREETYPE_PROPERTIES");
          int version = 35;
          const char* module = "truetype";
          const char* property = "interpreter-version";

          /* If some one is setting this, don't override it */
          if (props != NULL && strstr(property, props)) {
              return;
          }
      ```

      strstr (3) is misused.
      Correct use would be `strstr(props, property)`

      Due to:
      STRSTR(3)
      char *strstr(const char *haystack, const char *needle);
      The strstr() function finds the first occurrence of the substring needle in the string haystack.
      char *strstr(const char *haystack, const char *needle);

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: