Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e303a592
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看板
提交
e303a592
编写于
1月 13, 2016
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8146494: Better ligature substitution
Reviewed-by: vadim, mschoene
上级
a11f745f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
36 addition
and
0 deletion
+36
-0
src/share/native/sun/font/layout/LigatureSubstProc.cpp
src/share/native/sun/font/layout/LigatureSubstProc.cpp
+20
-0
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
+16
-0
未找到文件。
src/share/native/sun/font/layout/LigatureSubstProc.cpp
浏览文件 @
e303a592
...
@@ -71,6 +71,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
...
@@ -71,6 +71,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
{
{
LEErrorCode
success
=
LE_NO_ERROR
;
LEErrorCode
success
=
LE_NO_ERROR
;
const
LigatureSubstitutionStateEntry
*
entry
=
entryTable
.
getAlias
(
index
,
success
);
const
LigatureSubstitutionStateEntry
*
entry
=
entryTable
.
getAlias
(
index
,
success
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
0
;
}
ByteOffset
newState
=
SWAPW
(
entry
->
newStateOffset
);
ByteOffset
newState
=
SWAPW
(
entry
->
newStateOffset
);
le_uint16
flags
=
SWAPW
(
entry
->
flags
);
le_uint16
flags
=
SWAPW
(
entry
->
flags
);
...
@@ -91,6 +95,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
...
@@ -91,6 +95,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
if
(
actionOffset
!=
0
)
{
if
(
actionOffset
!=
0
)
{
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
actionOffset
);
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
actionOffset
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
LigatureActionEntry
action
;
LigatureActionEntry
action
;
le_int32
offset
,
i
=
0
,
j
=
0
;
le_int32
offset
,
i
=
0
,
j
=
0
;
le_int32
stack
[
nComponents
];
le_int32
stack
[
nComponents
];
...
@@ -101,6 +109,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
...
@@ -101,6 +109,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
if
(
j
++
>
0
)
{
if
(
j
++
>
0
)
{
ap
.
addObject
(
success
);
ap
.
addObject
(
success
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
}
}
action
=
SWAPL
(
*
ap
.
getAlias
());
action
=
SWAPL
(
*
ap
.
getAlias
());
...
@@ -124,9 +136,17 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
...
@@ -124,9 +136,17 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
return
newState
;
// get out! bad font
return
newState
;
// get out! bad font
}
}
i
+=
SWAPW
(
offsetTable
.
getObject
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
]),
success
));
i
+=
SWAPW
(
offsetTable
.
getObject
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
]),
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
if
(
action
&
(
lafLast
|
lafStore
))
{
if
(
action
&
(
lafLast
|
lafStore
))
{
LEReferenceTo
<
TTGlyphID
>
ligatureOffset
(
stHeader
,
success
,
i
);
LEReferenceTo
<
TTGlyphID
>
ligatureOffset
(
stHeader
,
success
,
i
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
TTGlyphID
ligatureGlyph
=
SWAPW
(
*
ligatureOffset
.
getAlias
());
TTGlyphID
ligatureGlyph
=
SWAPW
(
*
ligatureOffset
.
getAlias
());
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
...
...
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
浏览文件 @
e303a592
...
@@ -95,6 +95,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
...
@@ -95,6 +95,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
if
(
actionOffset
!=
0
)
{
if
(
actionOffset
!=
0
)
{
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
ligActionOffset
);
// byte offset
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
ligActionOffset
);
// byte offset
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
ap
.
addObject
(
ligActionIndex
,
success
);
ap
.
addObject
(
ligActionIndex
,
success
);
LEReferenceToArrayOf
<
TTGlyphID
>
ligatureTable
(
stHeader
,
success
,
ligatureOffset
,
LE_UNBOUNDED_ARRAY
);
LEReferenceToArrayOf
<
TTGlyphID
>
ligatureTable
(
stHeader
,
success
,
ligatureOffset
,
LE_UNBOUNDED_ARRAY
);
LigatureActionEntry
action
;
LigatureActionEntry
action
;
...
@@ -114,6 +118,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
...
@@ -114,6 +118,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
if
(
j
++
>
0
)
{
if
(
j
++
>
0
)
{
ap
.
addObject
(
success
);
ap
.
addObject
(
success
);
}
}
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
action
=
SWAPL
(
*
ap
.
getAlias
());
action
=
SWAPL
(
*
ap
.
getAlias
());
...
@@ -129,9 +137,17 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
...
@@ -129,9 +137,17 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
return
nextStateIndex
;
// get out! bad font
return
nextStateIndex
;
// get out! bad font
}
}
i
+=
SWAPW
(
componentTable
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
])
+
(
SignExtend
(
offset
,
lafComponentOffsetMask
)),
success
));
i
+=
SWAPW
(
componentTable
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
])
+
(
SignExtend
(
offset
,
lafComponentOffsetMask
)),
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
if
(
action
&
(
lafLast
|
lafStore
))
{
if
(
action
&
(
lafLast
|
lafStore
))
{
TTGlyphID
ligatureGlyph
=
SWAPW
(
ligatureTable
(
i
,
success
));
TTGlyphID
ligatureGlyph
=
SWAPW
(
ligatureTable
(
i
,
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
if
(
mm
==
nComponents
)
{
if
(
mm
==
nComponents
)
{
LE_DEBUG_BAD_FONT
(
"exceeded nComponents"
);
LE_DEBUG_BAD_FONT
(
"exceeded nComponents"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录