diff --git a/src/share/classes/sun/awt/FontConfiguration.java b/src/share/classes/sun/awt/FontConfiguration.java index 231f6a46779577c5e18e2c1fec362dd6390b0991..1744d084636d79437f77b35153be340f2e28b2f9 100644 --- a/src/share/classes/sun/awt/FontConfiguration.java +++ b/src/share/classes/sun/awt/FontConfiguration.java @@ -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 @@ public abstract class FontConfiguration { 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 @@ public abstract class FontConfiguration { if (configFile != null) { return configFile; } + if (osMajorVersion != null) { + configFile = findImpl(baseName + "." + osMajorVersion); + if (configFile != null) { + return configFile; + } + } } foundOsSpecificFile = false;