-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
11.0.6
-
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
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
- duplicates
-
JDK-8239091 Reversed arguments in call to strstr in freetype "debug" code.
- Resolved