Merge
authorlana
Mon, 12 Sep 2011 15:49:08 -0700
changeset 10415 ef10d1b03841
parent 10408 8785d4808ab1 (diff)
parent 10414 01425be03315 (current diff)
child 10442 687b47a41754
Merge
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java	Fri Sep 09 17:23:05 2011 -0700
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java	Mon Sep 12 15:49:08 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -266,11 +266,20 @@
     private File findFontConfigFile(String javaLib) {
         String baseName = javaLib + File.separator + "fontconfig";
         File configFile;
+        String osMajorVersion = null;
         if (osVersion != null && osName != null) {
             configFile = findImpl(baseName + "." + osName + "." + osVersion);
             if (configFile != null) {
                 return configFile;
             }
+            int decimalPointIndex = osVersion.indexOf(".");
+            if (decimalPointIndex != -1) {
+                osMajorVersion = osVersion.substring(0, osVersion.indexOf("."));
+                configFile = findImpl(baseName + "." + osName + "." + osMajorVersion);
+                if (configFile != null) {
+                    return configFile;
+                }
+            }
         }
         if (osName != null) {
             configFile = findImpl(baseName + "." + osName);
@@ -283,6 +292,12 @@
             if (configFile != null) {
                 return configFile;
             }
+            if (osMajorVersion != null) {
+                configFile = findImpl(baseName + "." + osMajorVersion);
+                if (configFile != null) {
+                    return configFile;
+                }
+            }
         }
         foundOsSpecificFile = false;
 
--- a/jdk/src/solaris/native/sun/awt/fontpath.c	Fri Sep 09 17:23:05 2011 -0700
+++ b/jdk/src/solaris/native/sun/awt/fontpath.c	Mon Sep 12 15:49:08 2011 -0700
@@ -1191,8 +1191,16 @@
 
             fontformat = NULL;
             (*FcPatternGetString)(fontPattern, FC_FONTFORMAT, 0, &fontformat);
-            if (fontformat != NULL && strcmp((char*)fontformat, "TrueType")
-                != 0) {
+            /* We only want TrueType fonts but some Linuxes still depend
+             * on Type 1 fonts for some Locale support, so we'll allow
+             * them there.
+             */
+            if (fontformat != NULL
+                && (strcmp((char*)fontformat, "TrueType") != 0)
+#ifdef __linux__
+                && (strcmp((char*)fontformat, "Type 1") != 0)
+#endif
+             ) {
                 continue;
             }
             result = (*FcPatternGetCharSet)(fontPattern,