Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e740c469
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e740c469
编写于
8月 14, 2009
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6867603: sun.font.FontManager.getDefaultPlatformFont throws NPE in OpenJDK on Solaris 10 10/08
Reviewed-by: igor, jgodinez
上级
006d992d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
26 addition
and
7 deletion
+26
-7
src/solaris/classes/sun/font/FontConfigManager.java
src/solaris/classes/sun/font/FontConfigManager.java
+19
-1
src/solaris/native/sun/awt/fontpath.c
src/solaris/native/sun/awt/fontpath.c
+7
-6
未找到文件。
src/solaris/classes/sun/font/FontConfigManager.java
浏览文件 @
e740c469
...
...
@@ -194,18 +194,36 @@ public class FontConfigManager {
fontArr
[
i
].
style
=
i
%
4
;
// depends on array order.
}
getFontConfig
(
getFCLocaleStr
(),
fcInfo
,
fontArr
,
includeFallbacks
);
FontConfigFont
anyFont
=
null
;
/* If don't find anything (eg no libfontconfig), then just return */
for
(
int
i
=
0
;
i
<
fontArr
.
length
;
i
++)
{
FcCompFont
fci
=
fontArr
[
i
];
if
(
fci
.
firstFont
==
null
)
{
if
(
FontUtilities
.
isLogging
())
{
Logger
logger
=
FontUtilities
.
getLogger
();
logger
.
info
(
"Fontconfig returned no fonts."
);
logger
.
info
(
"Fontconfig returned no font for "
+
fontArr
[
i
].
fcName
);
}
fontConfigFailed
=
true
;
}
else
if
(
anyFont
==
null
)
{
anyFont
=
fci
.
firstFont
;
}
}
if
(
anyFont
==
null
)
{
if
(
FontUtilities
.
isLogging
())
{
Logger
logger
=
FontUtilities
.
getLogger
();
logger
.
info
(
"Fontconfig returned no fonts at all."
);
return
;
}
}
else
if
(
fontConfigFailed
)
{
for
(
int
i
=
0
;
i
<
fontArr
.
length
;
i
++)
{
if
(
fontArr
[
i
].
firstFont
==
null
)
{
fontArr
[
i
].
firstFont
=
anyFont
;
}
}
}
fontConfigFonts
=
fontArr
;
if
(
FontUtilities
.
isLogging
())
{
...
...
src/solaris/native/sun/awt/fontpath.c
浏览文件 @
e740c469
...
...
@@ -1203,11 +1203,7 @@ Java_sun_font_FontConfigManager_getFontConfig
* Inspect the returned fonts and the ones we like (adds enough glyphs)
* are added to the arrays and we increment 'fontCount'.
*/
if
(
includeFallbacks
)
{
nfonts
=
fontset
->
nfont
;
}
else
{
nfonts
=
1
;
}
family
=
(
FcChar8
**
)
calloc
(
nfonts
,
sizeof
(
FcChar8
*
));
styleStr
=
(
FcChar8
**
)
calloc
(
nfonts
,
sizeof
(
FcChar8
*
));
fullname
=
(
FcChar8
**
)
calloc
(
nfonts
,
sizeof
(
FcChar8
*
));
...
...
@@ -1249,7 +1245,7 @@ Java_sun_font_FontConfigManager_getFontConfig
* adversely affects load time for minimal value-add.
* This is still likely far more than we've had in the past.
*/
if
(
nfonts
==
10
)
{
if
(
j
==
10
)
{
minGlyphs
=
50
;
}
if
(
unionCharset
==
NULL
)
{
...
...
@@ -1268,6 +1264,9 @@ Java_sun_font_FontConfigManager_getFontConfig
(
*
FcPatternGetString
)(
fontPattern
,
FC_FAMILY
,
0
,
&
family
[
j
]);
(
*
FcPatternGetString
)(
fontPattern
,
FC_STYLE
,
0
,
&
styleStr
[
j
]);
(
*
FcPatternGetString
)(
fontPattern
,
FC_FULLNAME
,
0
,
&
fullname
[
j
]);
if
(
!
includeFallbacks
)
{
break
;
}
}
/* Once we get here 'fontCount' is the number of returned fonts
...
...
@@ -1309,6 +1308,8 @@ Java_sun_font_FontConfigManager_getFontConfig
}
if
(
includeFallbacks
)
{
(
*
env
)
->
SetObjectArrayElement
(
env
,
fcFontArr
,
fn
++
,
fcFont
);
}
else
{
break
;
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录