Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
3b82ecf4
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看板
提交
3b82ecf4
编写于
12月 15, 2010
作者:
O
okutsu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6990037: font warnings in the build, missing fonts
Reviewed-by: peytoia
上级
1014d6fb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
68 addition
and
69 deletion
+68
-69
make/sun/awt/Makefile
make/sun/awt/Makefile
+5
-1
src/share/classes/sun/awt/FontConfiguration.java
src/share/classes/sun/awt/FontConfiguration.java
+63
-68
未找到文件。
make/sun/awt/Makefile
浏览文件 @
3b82ecf4
...
...
@@ -175,6 +175,10 @@ endif
include
$(BUILDDIR)/common/Mapfile-vers.gmk
include
$(BUILDDIR)/common/Library.gmk
COMPILEFONTCONFIG_FLAGS
=
ifdef
ALT_COMPILEFONTCONFIG_FLAGS
COMPILEFONTCONFIG_FLAGS
+=
$(ALT_COMPILEFONTCONFIG_FLAGS)
endif
build
:
fontconfigs
...
...
@@ -406,7 +410,7 @@ COMPILEFONTCONFIG_JARFILE = $(BUILDTOOLJARDIR)/compilefontconfig.jar
$(LIBDIR)/%.bfc
:
$(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%.properties
\
$(COMPILEFONTCONFIG_JARFILE)
$
(
prep-target
)
$(BOOT_JAVA_CMD)
-jar
$(COMPILEFONTCONFIG_JARFILE)
$<
$@
$(BOOT_JAVA_CMD)
-jar
$(COMPILEFONTCONFIG_JARFILE)
$
(COMPILEFONTCONFIG_FLAGS)
$
<
$@
$
(
install-module-file
)
$(
call
chmod-file, 444
)
@
$
(
java-vm-cleanup
)
...
...
src/share/classes/sun/awt/FontConfiguration.java
浏览文件 @
3b82ecf4
/*
* Copyright (c) 2000, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
10
, 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
...
...
@@ -37,10 +37,10 @@ import java.nio.charset.Charset;
import
java.nio.charset.CharsetEncoder
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Hashtable
;
import
java.util.Iterator
;
import
java.util.Locale
;
import
java.util.Map.Entry
;
import
java.util.Properties
;
...
...
@@ -329,6 +329,8 @@ public abstract class FontConfiguration {
* tables.
*/
public
static
void
saveBinary
(
OutputStream
out
)
throws
IOException
{
sanityCheck
();
DataOutputStream
dataOut
=
new
DataOutputStream
(
out
);
writeShortTable
(
dataOut
,
head
);
writeShortTable
(
dataOut
,
table_scriptIDs
);
...
...
@@ -350,7 +352,6 @@ public abstract class FontConfiguration {
if
(
verbose
)
{
dump
();
}
sanityCheck
();
}
//private static boolean loadingProperties;
...
...
@@ -1343,6 +1344,11 @@ public abstract class FontConfiguration {
private
static
short
[]
table_stringIDs
;
private
static
char
[]
table_stringTable
;
/**
* Checks consistencies of complied fontconfig data. This method
* is called only at the build-time from
* build.tools.compilefontconfig.CompileFontConfig.
*/
private
static
void
sanityCheck
()
{
int
errors
=
0
;
...
...
@@ -1358,12 +1364,20 @@ public abstract class FontConfiguration {
//componentFontNameID starts from "1"
for
(
int
ii
=
1
;
ii
<
table_filenames
.
length
;
ii
++)
{
if
(
table_filenames
[
ii
]
==
-
1
)
{
System
.
out
.
println
(
"\n Warning: "
+
"<filename."
+
getString
(
table_componentFontNameIDs
[
ii
])
+
"> entry is missing!!!"
);
if
(!
osName
.
contains
(
"Linux"
))
{
// The corresponding finename entry for a component
// font name is mandatory on Windows, but it's
// optional on Solaris and Linux.
if
(
osName
.
contains
(
"Windows"
))
{
System
.
err
.
println
(
"\n Error: <filename."
+
getString
(
table_componentFontNameIDs
[
ii
])
+
"> entry is missing!!!"
);
errors
++;
}
else
{
if
(
verbose
&&
!
isEmpty
(
table_filenames
))
{
System
.
err
.
println
(
"\n Note: 'filename' entry is undefined for \""
+
getString
(
table_componentFontNameIDs
[
ii
])
+
"\""
);
}
}
}
}
...
...
@@ -1382,7 +1396,7 @@ public abstract class FontConfiguration {
int
jj
=
iii
*
NUM_STYLES
+
iij
;
short
ffid
=
table_scriptFonts
[
fid
+
jj
];
if
(
ffid
==
0
)
{
System
.
out
.
println
(
"\n Error: <"
System
.
err
.
println
(
"\n Error: <"
+
getFontName
(
iii
)
+
"."
+
getStyleName
(
iij
)
+
"."
+
getString
(
table_scriptIDs
[
ii
])
...
...
@@ -1402,7 +1416,7 @@ public abstract class FontConfiguration {
script
.
contains
(
"symbol"
))
{
continue
;
}
System
.
out
.
println
(
"\nError: "
System
.
err
.
println
(
"\nError: "
+
"<awtfontpath."
+
script
+
"> entry is missing!!!"
);
...
...
@@ -1411,11 +1425,19 @@ public abstract class FontConfiguration {
}
}
if
(
errors
!=
0
)
{
System
.
out
.
println
(
"!!THERE ARE "
+
errors
+
" ERROR(S) IN "
System
.
err
.
println
(
"!!THERE ARE "
+
errors
+
" ERROR(S) IN "
+
"THE FONTCONFIG FILE, PLEASE CHECK ITS CONTENT!!\n"
);
System
.
exit
(
1
);
}
}
private
static
boolean
isEmpty
(
short
[]
a
)
{
for
(
short
s
:
a
)
{
if
(
s
!=
-
1
)
{
return
false
;
}
}
return
true
;
}
//dump the fontconfig data tables
...
...
@@ -1652,20 +1674,16 @@ public abstract class FontConfiguration {
private
static
void
writeShortTable
(
DataOutputStream
out
,
short
[]
data
)
throws
IOException
{
for
(
int
i
=
0
;
i
<
data
.
length
;
i
++
)
{
out
.
writeShort
(
data
[
i
]
);
for
(
short
val
:
data
)
{
out
.
writeShort
(
val
);
}
}
private
static
short
[]
toList
(
HashMap
map
)
{
private
static
short
[]
toList
(
HashMap
<
String
,
Short
>
map
)
{
short
[]
list
=
new
short
[
map
.
size
()];
for
(
int
i
=
0
;
i
<
list
.
length
;
i
++)
{
list
[
i
]
=
-
1
;
}
Iterator
iterator
=
map
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
String
,
Short
>
entry
=
(
Entry
<
String
,
Short
>)
iterator
.
next
();
list
[
entry
.
getValue
().
shortValue
()]
=
getStringID
(
entry
.
getKey
());
Arrays
.
fill
(
list
,
(
short
)
-
1
);
for
(
Entry
<
String
,
Short
>
entry
:
map
.
entrySet
())
{
list
[
entry
.
getValue
()]
=
getStringID
(
entry
.
getKey
());
}
return
list
;
}
...
...
@@ -1763,25 +1781,19 @@ public abstract class FontConfiguration {
int
len
=
table_scriptIDs
.
length
+
scriptFonts
.
size
()
*
20
;
table_scriptFonts
=
new
short
[
len
];
Iterator
iterator
=
scriptAllfonts
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
table_scriptFonts
[
entry
.
getKey
().
intValue
()]
=
(
short
)
entry
.
getValue
().
shortValue
();
for
(
Entry
<
Short
,
Short
>
entry
:
scriptAllfonts
.
entrySet
())
{
table_scriptFonts
[
entry
.
getKey
().
intValue
()]
=
entry
.
getValue
();
}
int
off
=
table_scriptIDs
.
length
;
iterator
=
scriptFonts
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
[]>
entry
=
(
Entry
<
Short
,
Short
[]>)
iterator
.
next
();
for
(
Entry
<
Short
,
Short
[]>
entry
:
scriptFonts
.
entrySet
())
{
table_scriptFonts
[
entry
.
getKey
().
intValue
()]
=
(
short
)-
off
;
Short
[]
v
=
entry
.
getValue
();
int
i
=
0
;
while
(
i
<
20
)
{
for
(
int
i
=
0
;
i
<
20
;
i
++)
{
if
(
v
[
i
]
!=
null
)
{
table_scriptFonts
[
off
++]
=
v
[
i
]
.
shortValue
()
;
table_scriptFonts
[
off
++]
=
v
[
i
];
}
else
{
table_scriptFonts
[
off
++]
=
0
;
}
i
++;
}
}
...
...
@@ -1792,9 +1804,7 @@ public abstract class FontConfiguration {
//(3) sequences elcID -> XXXX[1|5] -> scriptID[]
head
[
INDEX_sequences
]
=
(
short
)(
head
[
INDEX_elcIDs
]
+
table_elcIDs
.
length
);
table_sequences
=
new
short
[
elcIDs
.
size
()
*
NUM_FONTS
];
iterator
=
sequences
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
short
[]>
entry
=
(
Entry
<
Short
,
short
[]>)
iterator
.
next
();
for
(
Entry
<
Short
,
short
[]>
entry
:
sequences
.
entrySet
())
{
//table_sequences[entry.getKey().intValue()] = (short)-off;
int
k
=
entry
.
getKey
().
intValue
();
short
[]
v
=
entry
.
getValue
();
...
...
@@ -1827,31 +1837,24 @@ public abstract class FontConfiguration {
//(6)componentFontNameID -> filenameID
head
[
INDEX_filenames
]
=
(
short
)(
head
[
INDEX_componentFontNameIDs
]
+
table_componentFontNameIDs
.
length
);
table_filenames
=
new
short
[
table_componentFontNameIDs
.
length
];
for
(
int
i
=
0
;
i
<
table_filenames
.
length
;
i
++)
{
table_filenames
[
i
]
=
-
1
;
}
iterator
=
filenames
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
table_filenames
[
entry
.
getKey
().
shortValue
()]
=
entry
.
getValue
().
shortValue
();
Arrays
.
fill
(
table_filenames
,
(
short
)
-
1
);
for
(
Entry
<
Short
,
Short
>
entry
:
filenames
.
entrySet
())
{
table_filenames
[
entry
.
getKey
()]
=
entry
.
getValue
();
}
//(7)scriptID-> awtfontpath
//the paths are stored as scriptID -> stringID in awtfontpahts
head
[
INDEX_awtfontpaths
]
=
(
short
)(
head
[
INDEX_filenames
]
+
table_filenames
.
length
);
table_awtfontpaths
=
new
short
[
table_scriptIDs
.
length
];
iterator
=
awtfontpaths
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
table_awtfontpaths
[
entry
.
getKey
().
shortValue
()]
=
entry
.
getValue
().
shortValue
();
for
(
Entry
<
Short
,
Short
>
entry
:
awtfontpaths
.
entrySet
())
{
table_awtfontpaths
[
entry
.
getKey
()]
=
entry
.
getValue
();
}
//(8)exclusions
head
[
INDEX_exclusions
]
=
(
short
)(
head
[
INDEX_awtfontpaths
]
+
table_awtfontpaths
.
length
);
table_exclusions
=
new
short
[
scriptIDs
.
size
()];
iterator
=
exclusions
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
int
[]>
entry
=
(
Entry
<
Short
,
int
[]>)
iterator
.
next
();
for
(
Entry
<
Short
,
int
[]>
entry
:
exclusions
.
entrySet
())
{
int
[]
exI
=
entry
.
getValue
();
char
[]
exC
=
new
char
[
exI
.
length
*
2
];
int
j
=
0
;
...
...
@@ -1859,17 +1862,15 @@ public abstract class FontConfiguration {
exC
[
j
++]
=
(
char
)
(
exI
[
i
]
>>
16
);
exC
[
j
++]
=
(
char
)
(
exI
[
i
]
&
0xffff
);
}
table_exclusions
[
entry
.
getKey
()
.
shortValue
()
]
=
getStringID
(
new
String
(
exC
));
table_exclusions
[
entry
.
getKey
()]
=
getStringID
(
new
String
(
exC
));
}
//(9)proportionals
head
[
INDEX_proportionals
]
=
(
short
)(
head
[
INDEX_exclusions
]
+
table_exclusions
.
length
);
table_proportionals
=
new
short
[
proportionals
.
size
()
*
2
];
iterator
=
proportionals
.
entrySet
().
iterator
();
int
j
=
0
;
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
table_proportionals
[
j
++]
=
entry
.
getKey
().
shortValue
();
table_proportionals
[
j
++]
=
entry
.
getValue
().
shortValue
();
for
(
Entry
<
Short
,
Short
>
entry
:
proportionals
.
entrySet
())
{
table_proportionals
[
j
++]
=
entry
.
getKey
();
table_proportionals
[
j
++]
=
entry
.
getValue
();
}
//(10) see (1) for info, the only difference is "xxx.motif"
...
...
@@ -1878,22 +1879,18 @@ public abstract class FontConfiguration {
len
=
table_scriptIDs
.
length
+
scriptFontsMotif
.
size
()
*
20
;
table_scriptFontsMotif
=
new
short
[
len
];
iterator
=
scriptAllfontsMotif
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
for
(
Entry
<
Short
,
Short
>
entry
:
scriptAllfontsMotif
.
entrySet
())
{
table_scriptFontsMotif
[
entry
.
getKey
().
intValue
()]
=
(
short
)
entry
.
getValue
()
.
shortValue
()
;
(
short
)
entry
.
getValue
();
}
off
=
table_scriptIDs
.
length
;
iterator
=
scriptFontsMotif
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
[]>
entry
=
(
Entry
<
Short
,
Short
[]>)
iterator
.
next
();
for
(
Entry
<
Short
,
Short
[]>
entry
:
scriptFontsMotif
.
entrySet
())
{
table_scriptFontsMotif
[
entry
.
getKey
().
intValue
()]
=
(
short
)-
off
;
Short
[]
v
=
entry
.
getValue
();
int
i
=
0
;
while
(
i
<
20
)
{
if
(
v
[
i
]
!=
null
)
{
table_scriptFontsMotif
[
off
++]
=
v
[
i
]
.
shortValue
()
;
table_scriptFontsMotif
[
off
++]
=
v
[
i
];
}
else
{
table_scriptFontsMotif
[
off
++]
=
0
;
}
...
...
@@ -1907,12 +1904,10 @@ public abstract class FontConfiguration {
//(11)short[] alphabeticSuffix
head
[
INDEX_alphabeticSuffix
]
=
(
short
)(
head
[
INDEX_scriptFontsMotif
]
+
table_scriptFontsMotif
.
length
);
table_alphabeticSuffix
=
new
short
[
alphabeticSuffix
.
size
()
*
2
];
iterator
=
alphabeticSuffix
.
entrySet
().
iterator
();
j
=
0
;
while
(
iterator
.
hasNext
())
{
Entry
<
Short
,
Short
>
entry
=
(
Entry
<
Short
,
Short
>)
iterator
.
next
();
table_alphabeticSuffix
[
j
++]
=
entry
.
getKey
().
shortValue
();
table_alphabeticSuffix
[
j
++]
=
entry
.
getValue
().
shortValue
();
for
(
Entry
<
Short
,
Short
>
entry
:
alphabeticSuffix
.
entrySet
())
{
table_alphabeticSuffix
[
j
++]
=
entry
.
getKey
();
table_alphabeticSuffix
[
j
++]
=
entry
.
getValue
();
}
//(15)short[] fallbackScriptIDs; just put the ID in head
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录