提交 9b9b087f 编写于 作者: D dbuck

7074386: fallback to fontconfig.<major_version>.bfc/properties if...

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
上级 442a6aa7
/*
* 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册