Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
99e147f3
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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,发现更多精彩内容 >>
提交
99e147f3
编写于
4月 01, 2013
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8005007: Better glyph processing
Reviewed-by: srl, mschoene, bae
上级
1159c1fd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
7 deletion
+24
-7
src/share/classes/sun/font/ExtendedTextSourceLabel.java
src/share/classes/sun/font/ExtendedTextSourceLabel.java
+12
-1
src/share/native/sun/font/layout/LEGlyphStorage.cpp
src/share/native/sun/font/layout/LEGlyphStorage.cpp
+11
-5
src/share/native/sun/font/layout/LookupProcessor.cpp
src/share/native/sun/font/layout/LookupProcessor.cpp
+1
-1
未找到文件。
src/share/classes/sun/font/ExtendedTextSourceLabel.java
浏览文件 @
99e147f3
...
...
@@ -367,6 +367,9 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La
validate
(
index
);
float
[]
charinfo
=
getCharinfo
();
index
=
l2v
(
index
)
*
numvals
;
if
((
index
+
vish
)
>=
charinfo
.
length
)
{
return
new
Rectangle2D
.
Float
();
}
return
new
Rectangle2D
.
Float
(
charinfo
[
index
+
visx
],
charinfo
[
index
+
visy
],
...
...
@@ -456,6 +459,10 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La
int
length
=
source
.
getLength
();
--
start
;
while
(
width
>=
0
&&
++
start
<
length
)
{
int
cidx
=
l2v
(
start
)
*
numvals
+
advx
;
if
(
cidx
>=
charinfo
.
length
)
{
break
;
// layout bailed for some reason
}
float
adv
=
charinfo
[
l2v
(
start
)
*
numvals
+
advx
];
width
-=
adv
;
}
...
...
@@ -469,7 +476,11 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La
float
[]
charinfo
=
getCharinfo
();
--
start
;
while
(++
start
<
limit
)
{
a
+=
charinfo
[
l2v
(
start
)
*
numvals
+
advx
];
int
cidx
=
l2v
(
start
)
*
numvals
+
advx
;
if
(
cidx
>=
charinfo
.
length
)
{
break
;
// layout bailed for some reason
}
a
+=
charinfo
[
cidx
];
}
return
a
;
...
...
src/share/native/sun/font/layout/LEGlyphStorage.cpp
浏览文件 @
99e147f3
...
...
@@ -584,7 +584,7 @@ le_int32 LEGlyphStorage::applyInsertions()
{
le_int32
growAmount
=
fInsertionList
->
getGrowAmount
();
if
(
growAmount
=
=
0
)
{
if
(
growAmount
<
=
0
)
{
return
fGlyphCount
;
}
...
...
@@ -613,7 +613,9 @@ le_int32 LEGlyphStorage::applyInsertions()
fAuxData
=
(
le_uint32
*
)
newAuxData
;
}
fSrcIndex
=
fGlyphCount
-
1
;
if
(
fGlyphCount
>
0
)
{
fSrcIndex
=
fGlyphCount
-
1
;
}
fDestIndex
=
newGlyphCount
-
1
;
#if 0
...
...
@@ -653,6 +655,10 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl
}
#endif
if
(
atPosition
<
0
||
fSrcIndex
<
0
||
fDestIndex
<
0
)
{
return
FALSE
;
}
if
(
fAuxData
!=
NULL
)
{
le_int32
src
=
fSrcIndex
,
dest
=
fDestIndex
;
...
...
@@ -665,7 +671,7 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl
}
}
while
(
fSrcIndex
>
atPosition
)
{
while
(
fSrcIndex
>
atPosition
&&
fSrcIndex
>=
0
&&
fDestIndex
>=
0
)
{
fGlyphs
[
fDestIndex
]
=
fGlyphs
[
fSrcIndex
];
fCharIndices
[
fDestIndex
]
=
fCharIndices
[
fSrcIndex
];
...
...
@@ -673,7 +679,7 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl
fSrcIndex
-=
1
;
}
for
(
le_int32
i
=
count
-
1
;
i
>=
0
;
i
-=
1
)
{
for
(
le_int32
i
=
count
-
1
;
i
>=
0
&&
fDestIndex
>=
0
;
i
-=
1
)
{
fGlyphs
[
fDestIndex
]
=
newGlyphs
[
i
];
fCharIndices
[
fDestIndex
]
=
fCharIndices
[
atPosition
];
...
...
@@ -682,7 +688,7 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl
// the source glyph we're pointing at
// just got replaced by the insertion
fSrcIndex
-=
1
;
fSrcIndex
-=
1
;
return
FALSE
;
}
...
...
src/share/native/sun/font/layout/LookupProcessor.cpp
浏览文件 @
99e147f3
...
...
@@ -61,7 +61,7 @@ le_uint32 LookupProcessor::applyLookupTable(const LEReferenceTo<LookupTable> &lo
delta
=
applySubtable
(
lookupSubtable
,
lookupType
,
glyphIterator
,
fontInstance
,
success
);
if
(
delta
>
0
&&
LE_FAILURE
(
success
))
{
if
(
delta
>
0
||
LE_FAILURE
(
success
))
{
return
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录