OpenJDK / bsd-port / bsd-port / jdk
changeset 4584:b3ad3ae88902
7074386: fallback to fontconfig.<major_version>.bfc/properties if fontconfig.<major_version>.<minor_version>.
Summary: fallback to fontconfig.<major_version>.bfc/properties if fontconfig.<major_version>.<minor_version>. is not found
Reviewed-by: prr, robm
author | dbuck |
---|---|
date | Fri, 09 Sep 2011 09:08:10 -0700 |
parents | 8dd76a55475d |
children | ad0ed291a69b |
files | src/share/classes/sun/awt/FontConfiguration.java |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/awt/FontConfiguration.java Fri Sep 09 14:44:20 2011 +0400 +++ b/src/share/classes/sun/awt/FontConfiguration.java Fri Sep 09 09:08:10 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;