提交 2e5fce2a 编写于 作者: N neugens

8188030: AWT java apps fail to start when some minimal fonts are present

Summary: Allow using CFF fonts as valid fonts when they are returned by fontconfig during font initialisation.
Reviewed-by: prr, serb, robm
上级 a2347a14
......@@ -1051,6 +1051,16 @@ Java_sun_font_FontConfigManager_getFontConfig
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;
}
......@@ -1239,6 +1249,7 @@ Java_sun_font_FontConfigManager_getFontConfig
&& (strcmp((char*)fontformat, "TrueType") != 0)
#if defined(__linux__) || defined(_AIX)
&& (strcmp((char*)fontformat, "Type 1") != 0)
&& !(isOpenJDK && (strcmp((char*)fontformat, "CFF") == 0))
#endif
) {
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册