--- old/src/java.desktop/unix/native/common/awt/fontpath.c 2020-05-20 18:02:43.805218963 -0700 +++ new/src/java.desktop/unix/native/common/awt/fontpath.c 2020-05-20 18:02:43.465212435 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,9 +34,6 @@ #include #include #include -#ifdef __solaris__ -#include -#endif #include #include @@ -64,57 +61,7 @@ #define MAXFDIRS 512 /* Max number of directories that contain fonts */ -#if defined(__solaris__) -/* - * This can be set in the makefile to "/usr/X11" if so desired. - */ -#ifndef OPENWINHOMELIB -#define OPENWINHOMELIB "/usr/openwin/lib/" -#endif - -/* This is all known Solaris X11 directories on Solaris 8, 9 and 10. - * It is ordered to give precedence to TrueType directories. - * It is needed if fontconfig is not installed or configured properly. - */ -static char *fullSolarisFontPath[] = { - OPENWINHOMELIB "X11/fonts/TrueType", - OPENWINHOMELIB "locale/euro_fonts/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_2/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_5/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_7/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_8/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_9/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_13/X11/fonts/TrueType", - OPENWINHOMELIB "locale/iso_8859_15/X11/fonts/TrueType", - OPENWINHOMELIB "locale/ar/X11/fonts/TrueType", - OPENWINHOMELIB "locale/hi_IN.UTF-8/X11/fonts/TrueType", - OPENWINHOMELIB "locale/ja/X11/fonts/TT", - OPENWINHOMELIB "locale/ko/X11/fonts/TrueType", - OPENWINHOMELIB "locale/ko.UTF-8/X11/fonts/TrueType", - OPENWINHOMELIB "locale/KOI8-R/X11/fonts/TrueType", - OPENWINHOMELIB "locale/ru.ansi-1251/X11/fonts/TrueType", - OPENWINHOMELIB "locale/th_TH/X11/fonts/TrueType", - OPENWINHOMELIB "locale/zh_TW/X11/fonts/TrueType", - OPENWINHOMELIB "locale/zh_TW.BIG5/X11/fonts/TT", - OPENWINHOMELIB "locale/zh_HK.BIG5HK/X11/fonts/TT", - OPENWINHOMELIB "locale/zh_CN.GB18030/X11/fonts/TrueType", - OPENWINHOMELIB "locale/zh/X11/fonts/TrueType", - OPENWINHOMELIB "locale/zh.GBK/X11/fonts/TrueType", - OPENWINHOMELIB "X11/fonts/Type1", - OPENWINHOMELIB "X11/fonts/Type1/sun", - OPENWINHOMELIB "X11/fonts/Type1/sun/outline", - OPENWINHOMELIB "locale/iso_8859_2/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_4/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_5/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_7/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_8/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_9/X11/fonts/Type1", - OPENWINHOMELIB "locale/iso_8859_13/X11/fonts/Type1", - OPENWINHOMELIB "locale/ar/X11/fonts/Type1", - NULL, /* terminates the list */ -}; - -#elif defined( __linux__) +#if defined( __linux__) /* All the known interesting locations we have discovered on * various flavors of Linux */ @@ -364,14 +311,6 @@ if (strstr(x11Path[i], ".gnome") != NULL) { continue; } -#ifdef __solaris__ - if (strstr(x11Path[i], "/F3/") != NULL) { - continue; - } - if (strstr(x11Path[i], "bitmap") != NULL) { - continue; - } -#endif fontdirs[pos] = strdup(x11Path[i]); slen = strlen(fontdirs[pos]); if (slen > 0 && fontdirs[pos][slen-1] == '/') { @@ -521,8 +460,6 @@ #if defined(__linux__) knowndirs = fullLinuxFontPath; -#elif defined(__solaris__) - knowndirs = fullSolarisFontPath; #elif defined(_AIX) knowndirs = fullAixFontPath; #endif @@ -592,10 +529,6 @@ char *homeEnv; static char *homeEnvStr = "HOME="; /* must be static */ void* libfontconfig = NULL; -#ifdef __solaris__ -#define SYSINFOBUFSZ 8 - char sysinfobuf[SYSINFOBUFSZ]; -#endif /* Private workaround to not use fontconfig library. * May be useful during testing/debugging @@ -605,21 +538,6 @@ return NULL; } -#ifdef __solaris__ - /* fontconfig is likely not properly configured on S8/S9 - skip it, - * although allow user to override this behaviour with an env. variable - * ie if USE_J2D_FONTCONFIG=yes then we skip this test. - * NB "4" is the length of a string which matches our patterns. - */ - if (useFC == NULL || strcmp(useFC, "yes")) { - if (sysinfo(SI_RELEASE, sysinfobuf, SYSINFOBUFSZ) == 4) { - if ((!strcmp(sysinfobuf, "5.8") || !strcmp(sysinfobuf, "5.9"))) { - return NULL; - } - } - } -#endif - #if defined(_AIX) /* On AIX, fontconfig is not a standard package supported by IBM. * instead it has to be installed from the "AIX Toolbox for Linux Applications"