< prev index next >
src/solaris/native/sun/awt/fontpath.c
Print this page
*** 1049,1058 ****
--- 1049,1068 ----
CHECK_NULL(fullNameID = (*env)->GetFieldID(env, fcFontClass,
"fullName", "Ljava/lang/String;"));
CHECK_NULL(fontFileID = (*env)->GetFieldID(env, fcFontClass,
"fontFile", "Ljava/lang/String;"));
+ jclass fontUtilitiesClass =
+ (*env)->FindClass(env, "sun/font/FontUtilities");
+ CHECK_NULL(fontUtilitiesClass);
+ jfieldID isOpenJDKID =
+ (*env)->GetStaticFieldID(env, fontUtilitiesClass, "isOpenJDK", "Z");
+ CHECK_NULL(isOpenJDKID);
+ jboolean isOpenJDK =
+ (*env)->GetStaticBooleanField(env, fontUtilitiesClass, isOpenJDKID);
+
+
if ((libfontconfig = openFontConfig()) == NULL) {
return;
}
FcNameParse = (FcNameParseFuncType)dlsym(libfontconfig, "FcNameParse");
*** 1237,1246 ****
--- 1247,1257 ----
*/
if (fontformat != NULL
&& (strcmp((char*)fontformat, "TrueType") != 0)
#if defined(__linux__) || defined(_AIX)
&& (strcmp((char*)fontformat, "Type 1") != 0)
+ && !(isOpenJDK && (strcmp((char*)fontformat, "CFF") == 0))
#endif
) {
continue;
}
result = (*FcPatternGetCharSet)(fontPattern,
< prev index next >