# HG changeset patch # User lana # Date 1315867748 25200 # Node ID ef10d1b038419cfec5efdfc6c2712d84475ff46d # Parent 8785d4808ab12615ae5b2434a481fd8c4f7b6592# Parent 01425be03315a86f67ba245c9296a4af55067531 Merge diff -r 01425be03315 -r ef10d1b03841 jdk/src/share/classes/sun/awt/FontConfiguration.java --- 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; diff -r 01425be03315 -r ef10d1b03841 jdk/src/solaris/native/sun/awt/fontpath.c --- 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,