Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
d0ba0557
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d0ba0557
编写于
5月 18, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] ChainContext complete
IranNastaliq renders perfectly again!
上级
e072c24e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
17 deletion
+46
-17
src/hb-ot-layout-gsubgpos-private.h
src/hb-ot-layout-gsubgpos-private.h
+46
-17
未找到文件。
src/hb-ot-layout-gsubgpos-private.h
浏览文件 @
d0ba0557
...
...
@@ -71,6 +71,34 @@ static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value,
}
static
inline
bool
match_input
(
LOOKUP_ARGS_DEF
,
unsigned
int
count
,
/* Including the first glyph (not matched) */
const
USHORT
input
[],
/* Array of input values--start with second glyph */
match_func_t
match_func
,
char
*
match_data
,
unsigned
int
*
context_length_out
)
{
unsigned
int
i
,
j
;
/* XXX context_length should also be checked when skipping glyphs, right?
* What does context_length really mean, anyway? */
for
(
i
=
1
,
j
=
buffer
->
in_pos
+
1
;
i
<
count
;
i
++
,
j
++
)
{
while
(
!
_hb_ot_layout_check_glyph_property
(
layout
,
IN_ITEM
(
j
),
lookup_flag
,
&
property
))
{
if
(
HB_UNLIKELY
(
j
+
count
-
i
==
buffer
->
in_length
))
return
false
;
j
++
;
}
if
(
HB_LIKELY
(
!
match_func
(
IN_GLYPH
(
j
),
input
[
i
-
1
],
match_data
)))
return
false
;
}
*
context_length_out
=
j
-
buffer
->
in_pos
;
return
true
;
}
static
inline
bool
match_backtrack
(
LOOKUP_ARGS_DEF
,
unsigned
int
count
,
const
USHORT
backtrack
[],
...
...
@@ -86,39 +114,33 @@ static inline bool match_backtrack (LOOKUP_ARGS_DEF,
j
--
;
}
if
(
HB_LIKELY
(
match_func
(
OUT_GLYPH
(
j
),
backtrack
[
i
],
match_data
)))
if
(
HB_LIKELY
(
!
match_func
(
OUT_GLYPH
(
j
),
backtrack
[
i
],
match_data
)))
return
false
;
}
return
true
;
}
static
inline
bool
match_
input
(
LOOKUP_ARGS_DEF
,
unsigned
int
count
,
/* Including the first glyph (not matched) */
const
USHORT
input
[],
/* Array of input values--start with second glyph */
match_func_t
match_func
,
char
*
match_data
,
unsigned
int
*
context_length_ou
t
)
static
inline
bool
match_
lookahead
(
LOOKUP_ARGS_DEF
,
unsigned
int
count
,
const
USHORT
lookahead
[],
match_func_t
match_func
,
char
*
match_data
,
unsigned
int
offse
t
)
{
unsigned
int
i
,
j
;
/* XXX context_length should also be checked when skipping glyphs, right?
* What does context_length really mean, anyway? */
for
(
i
=
1
,
j
=
buffer
->
in_pos
+
1
;
i
<
count
;
i
++
,
j
++
)
{
while
(
!
_hb_ot_layout_check_glyph_property
(
layout
,
IN_ITEM
(
j
),
lookup_flag
,
&
property
))
{
for
(
i
=
0
,
j
=
buffer
->
in_pos
+
offset
;
i
<
count
;
i
++
,
j
++
)
{
while
(
!
_hb_ot_layout_check_glyph_property
(
layout
,
OUT_ITEM
(
j
),
lookup_flag
,
&
property
))
{
if
(
HB_UNLIKELY
(
j
+
count
-
i
==
buffer
->
in_length
))
return
false
;
j
++
;
}
if
(
HB_LIKELY
(
match_func
(
IN_GLYPH
(
j
),
input
[
i
-
1
],
match_data
)))
if
(
HB_LIKELY
(
!
match_func
(
IN_GLYPH
(
j
),
lookahead
[
i
],
match_data
)))
return
false
;
}
/* XXX right? or j - buffer_inpos? */
*
context_length_out
=
count
;
return
true
;
}
...
...
@@ -406,13 +428,20 @@ static inline bool chain_context_lookup (LOOKUP_ARGS_DEF,
buffer
->
in_pos
+
inputCount
+
lookaheadCount
>
buffer
->
in_length
))
return
false
;
unsigned
int
offset
;
return
match_backtrack
(
LOOKUP_ARGS
,
backtrackCount
,
backtrack
,
context
.
funcs
.
match
,
context
.
match_data
[
0
])
&&
match_input
(
LOOKUP_ARGS
,
inputCount
,
input
,
context
.
funcs
.
match
,
context
.
match_data
[
1
],
&
context_length
)
&&
&
offset
)
&&
(
context_length
-=
offset
,
true
)
&&
match_lookahead
(
LOOKUP_ARGS
,
lookaheadCount
,
lookahead
,
context
.
funcs
.
match
,
context
.
match_data
[
2
],
offset
)
&&
(
context_length
=
offset
,
true
)
&&
apply_lookup
(
LOOKUP_ARGS
,
inputCount
,
lookupCount
,
lookupRecord
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录