Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
335d110f
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看板
提交
335d110f
编写于
3月 10, 2015
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8071715: Tune font layout engine
Reviewed-by: srl, bae, mschoene
上级
a456f1a0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
45 addition
and
6 deletion
+45
-6
src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp
.../native/sun/font/layout/ContextualGlyphInsertionProc2.cpp
+8
-0
src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
...share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
+8
-0
src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp
...hare/native/sun/font/layout/ContextualGlyphSubstProc2.cpp
+12
-4
src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp
...re/native/sun/font/layout/IndicRearrangementProcessor.cpp
+5
-0
src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp
...e/native/sun/font/layout/IndicRearrangementProcessor2.cpp
+5
-0
src/share/native/sun/font/layout/LigatureSubstProc.cpp
src/share/native/sun/font/layout/LigatureSubstProc.cpp
+1
-1
src/share/native/sun/font/layout/StateTableProcessor.cpp
src/share/native/sun/font/layout/StateTableProcessor.cpp
+1
-0
src/share/native/sun/font/layout/StateTableProcessor2.cpp
src/share/native/sun/font/layout/StateTableProcessor2.cpp
+4
-0
src/share/native/sun/font/layout/StateTables.h
src/share/native/sun/font/layout/StateTables.h
+1
-1
未找到文件。
src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp
浏览文件 @
335d110f
...
...
@@ -107,6 +107,10 @@ le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &
le_int16
markIndex
=
SWAPW
(
entry
->
markedInsertionListIndex
);
if
(
markIndex
>
0
)
{
if
(
markGlyph
<
0
||
markGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
le_int16
count
=
(
flags
&
cgiMarkedInsertCountMask
)
>>
5
;
le_bool
isKashidaLike
=
(
flags
&
cgiMarkedIsKashidaLike
);
le_bool
isBefore
=
(
flags
&
cgiMarkInsertBefore
);
...
...
@@ -115,6 +119,10 @@ le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &
le_int16
currIndex
=
SWAPW
(
entry
->
currentInsertionListIndex
);
if
(
currIndex
>
0
)
{
if
(
currGlyph
<
0
||
currGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
le_int16
count
=
flags
&
cgiCurrentInsertCountMask
;
le_bool
isKashidaLike
=
(
flags
&
cgiCurrentIsKashidaLike
);
le_bool
isBefore
=
(
flags
&
cgiCurrentInsertBefore
);
...
...
src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
浏览文件 @
335d110f
...
...
@@ -76,6 +76,10 @@ ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorag
WordOffset
currOffset
=
SWAPW
(
entry
->
currOffset
);
if
(
markOffset
!=
0
&&
LE_SUCCESS
(
success
))
{
if
(
markGlyph
<
0
||
markGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
LEGlyphID
mGlyph
=
glyphStorage
[
markGlyph
];
TTGlyphID
newGlyph
=
SWAPW
(
int16Table
.
getObject
(
markOffset
+
LE_GET_GLYPH
(
mGlyph
),
success
));
// whew.
...
...
@@ -83,6 +87,10 @@ ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorag
}
if
(
currOffset
!=
0
)
{
if
(
currGlyph
<
0
||
currGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
LEGlyphID
thisGlyph
=
glyphStorage
[
currGlyph
];
TTGlyphID
newGlyph
=
SWAPW
(
int16Table
.
getObject
(
currOffset
+
LE_GET_GLYPH
(
thisGlyph
),
success
));
// whew.
...
...
src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp
浏览文件 @
335d110f
...
...
@@ -70,17 +70,25 @@ le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorag
if
(
LE_FAILURE
(
success
))
return
0
;
le_uint16
newState
=
SWAPW
(
entry
->
newStateIndex
);
le_uint16
flags
=
SWAPW
(
entry
->
flags
);
le_int16
markIndex
=
SWAPW
(
entry
->
markIndex
);
le_int16
currIndex
=
SWAPW
(
entry
->
currIndex
);
le_
u
int16
markIndex
=
SWAPW
(
entry
->
markIndex
);
le_
u
int16
currIndex
=
SWAPW
(
entry
->
currIndex
);
if
(
markIndex
!=
-
1
)
{
if
(
markIndex
!=
0x0FFFF
)
{
if
(
markGlyph
<
0
||
markGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
le_uint32
offset
=
SWAPL
(
perGlyphTable
(
markIndex
,
success
));
LEGlyphID
mGlyph
=
glyphStorage
[
markGlyph
];
TTGlyphID
newGlyph
=
lookup
(
offset
,
mGlyph
,
success
);
glyphStorage
[
markGlyph
]
=
LE_SET_GLYPH
(
mGlyph
,
newGlyph
);
}
if
(
currIndex
!=
-
1
)
{
if
(
currIndex
!=
0x0FFFF
)
{
if
(
currGlyph
<
0
||
currGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
le_uint32
offset
=
SWAPL
(
perGlyphTable
(
currIndex
,
success
));
LEGlyphID
thisGlyph
=
glyphStorage
[
currGlyph
];
TTGlyphID
newGlyph
=
lookup
(
offset
,
thisGlyph
,
success
);
...
...
src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp
浏览文件 @
335d110f
...
...
@@ -70,6 +70,11 @@ ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphS
ByteOffset
newState
=
SWAPW
(
entry
->
newStateOffset
);
IndicRearrangementFlags
flags
=
(
IndicRearrangementFlags
)
SWAPW
(
entry
->
flags
);
if
(
currGlyph
<
0
||
currGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
if
(
flags
&
irfMarkFirst
)
{
firstGlyph
=
currGlyph
;
}
...
...
src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp
浏览文件 @
335d110f
...
...
@@ -68,6 +68,11 @@ le_uint16 IndicRearrangementProcessor2::processStateEntry(LEGlyphStorage &glyphS
le_uint16
newState
=
SWAPW
(
entry
->
newStateIndex
);
// index to the new state
IndicRearrangementFlags
flags
=
(
IndicRearrangementFlags
)
SWAPW
(
entry
->
flags
);
if
(
currGlyph
<
0
||
currGlyph
>=
glyphStorage
.
getGlyphCount
())
{
success
=
LE_INDEX_OUT_OF_BOUNDS_ERROR
;
return
0
;
}
if
(
flags
&
irfMarkFirst
)
{
firstGlyph
=
currGlyph
;
}
...
...
src/share/native/sun/font/layout/LigatureSubstProc.cpp
浏览文件 @
335d110f
...
...
@@ -73,7 +73,7 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
const
LigatureSubstitutionStateEntry
*
entry
=
entryTable
.
getAlias
(
index
,
success
);
ByteOffset
newState
=
SWAPW
(
entry
->
newStateOffset
);
le_int16
flags
=
SWAPW
(
entry
->
flags
);
le_
u
int16
flags
=
SWAPW
(
entry
->
flags
);
if
(
flags
&
lsfSetComponent
)
{
if
(
++
m
>=
nComponents
)
{
...
...
src/share/native/sun/font/layout/StateTableProcessor.cpp
浏览文件 @
335d110f
...
...
@@ -85,6 +85,7 @@ void StateTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &suc
if
(
currGlyph
==
glyphCount
)
{
// XXX: How do we handle EOT vs. EOL?
classCode
=
classCodeEOT
;
break
;
}
else
{
TTGlyphID
glyphCode
=
(
TTGlyphID
)
LE_GET_GLYPH
(
glyphStorage
[
currGlyph
]);
...
...
src/share/native/sun/font/layout/StateTableProcessor2.cpp
浏览文件 @
335d110f
...
...
@@ -103,6 +103,7 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &su
if
(
currGlyph
==
glyphCount
||
currGlyph
==
-
1
)
{
// XXX: How do we handle EOT vs. EOL?
classCode
=
classCodeEOT
;
break
;
}
else
{
LEGlyphID
gid
=
glyphStorage
[
currGlyph
];
TTGlyphID
glyphCode
=
(
TTGlyphID
)
LE_GET_GLYPH
(
gid
);
...
...
@@ -134,6 +135,7 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &su
if
(
currGlyph
==
glyphCount
||
currGlyph
==
-
1
)
{
// XXX: How do we handle EOT vs. EOL?
classCode
=
classCodeEOT
;
break
;
}
else
{
LEGlyphID
gid
=
glyphStorage
[
currGlyph
];
TTGlyphID
glyphCode
=
(
TTGlyphID
)
LE_GET_GLYPH
(
gid
);
...
...
@@ -171,6 +173,7 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &su
if
(
currGlyph
==
glyphCount
||
currGlyph
==
-
1
)
{
// XXX: How do we handle EOT vs. EOL?
classCode
=
classCodeEOT
;
break
;
}
else
if
(
currGlyph
>
glyphCount
)
{
// note if > glyphCount, we've run off the end (bad font)
currGlyph
=
glyphCount
;
...
...
@@ -211,6 +214,7 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &su
if
(
currGlyph
==
glyphCount
||
currGlyph
==
-
1
)
{
// XXX: How do we handle EOT vs. EOL?
classCode
=
classCodeEOT
;
break
;
}
else
{
TTGlyphID
glyphCode
=
(
TTGlyphID
)
LE_GET_GLYPH
(
glyphStorage
[
currGlyph
]);
if
(
glyphCode
==
0xFFFF
)
{
...
...
src/share/native/sun/font/layout/StateTables.h
浏览文件 @
335d110f
...
...
@@ -126,7 +126,7 @@ typedef le_uint8 EntryTableIndex;
struct
StateEntry
{
ByteOffset
newStateOffset
;
le_int16
flags
;
le_
u
int16
flags
;
};
typedef
le_uint16
EntryTableIndex2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录