Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
8c69e65a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8c69e65a
编写于
10月 27, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename lookup_flags to lookup_props since it's more than just flags
上级
98370e89
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
43 addition
and
39 deletion
+43
-39
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+5
-1
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+7
-7
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+4
-4
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+5
-5
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+2
-2
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+18
-18
src/main.cc
src/main.cc
+2
-2
未找到文件。
src/hb-ot-layout-common-private.hh
浏览文件 @
8c69e65a
...
...
@@ -290,7 +290,11 @@ struct Lookup
inline
unsigned
int
get_subtable_count
(
void
)
const
{
return
subTable
.
len
;
}
inline
unsigned
int
get_type
(
void
)
const
{
return
lookupType
;
}
inline
unsigned
int
get_flag
(
void
)
const
/* lookup_props is a 32-bit integer where the lower 16-bit is LookupFlag and
* higher 16-bit is mark-filtering-set if the lookup uses one.
* Not to be confused with glyph_props which is very similar. */
inline
uint32_t
get_props
(
void
)
const
{
unsigned
int
flag
=
lookupFlag
;
if
(
unlikely
(
flag
&
LookupFlag
::
UseMarkFilteringSet
))
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
8c69e65a
...
...
@@ -625,7 +625,7 @@ struct PairPosFormat1
return
false
;
unsigned
int
j
=
c
->
buffer
->
i
+
1
;
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
==
end
))
return
false
;
...
...
@@ -687,7 +687,7 @@ struct PairPosFormat2
return
false
;
unsigned
int
j
=
c
->
buffer
->
i
+
1
;
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
==
end
))
return
false
;
...
...
@@ -840,7 +840,7 @@ struct CursivePosFormat1
return
false
;
unsigned
int
j
=
c
->
buffer
->
i
+
1
;
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
==
end
))
return
false
;
...
...
@@ -876,7 +876,7 @@ struct CursivePosFormat1
c
->
buffer
->
pos
[
i
].
y_advance
=
c
->
buffer
->
pos
[
i
].
y_offset
+
exit_y
-
entry_y
;
}
if
(
c
->
lookup_
flag
&
LookupFlag
::
RightToLeft
)
if
(
c
->
lookup_
props
&
LookupFlag
::
RightToLeft
)
{
c
->
buffer
->
pos
[
i
].
cursive_chain
()
=
j
-
i
;
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
...
...
@@ -1192,7 +1192,7 @@ struct MarkMarkPosFormat1
if
(
unlikely
(
!
j
))
return
false
;
j
--
;
}
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
&
property
));
}
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
&
property
));
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
))
return
false
;
...
...
@@ -1411,9 +1411,9 @@ struct PosLookup : Lookup
c
->
lookup_mask
=
lookup_mask
;
c
->
context_length
=
context_length
;
c
->
nesting_level_left
=
nesting_level_left
;
c
->
lookup_
flag
=
get_flag
();
c
->
lookup_
props
=
get_props
();
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
flag
,
&
c
->
property
))
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
props
,
&
c
->
property
))
return
false
;
for
(
unsigned
int
i
=
0
;
i
<
get_subtable_count
();
i
++
)
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
8c69e65a
...
...
@@ -354,7 +354,7 @@ struct Ligature
for
(
i
=
1
,
j
=
c
->
buffer
->
i
+
1
;
i
<
count
;
i
++
,
j
++
)
{
unsigned
int
property
;
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
&
property
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
&
property
))
{
if
(
unlikely
(
j
+
count
-
i
==
end
))
return
false
;
...
...
@@ -392,7 +392,7 @@ struct Ligature
for
(
i
=
1
;
i
<
count
;
i
++
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
props
,
NULL
))
{
c
->
buffer
->
info
[
c
->
buffer
->
i
].
component
()
=
i
;
c
->
buffer
->
info
[
c
->
buffer
->
i
].
lig_id
()
=
lig_id
;
...
...
@@ -776,9 +776,9 @@ struct SubstLookup : Lookup
c
->
lookup_mask
=
lookup_mask
;
c
->
context_length
=
context_length
;
c
->
nesting_level_left
=
nesting_level_left
;
c
->
lookup_
flag
=
get_flag
();
c
->
lookup_
props
=
get_props
();
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
flag
,
&
c
->
property
))
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
props
,
&
c
->
property
))
return
false
;
if
(
unlikely
(
lookup_type
==
SubstLookupSubTable
::
Extension
))
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
8c69e65a
...
...
@@ -53,7 +53,7 @@ struct hb_apply_context_t
hb_mask_t
lookup_mask
;
unsigned
int
context_length
;
unsigned
int
nesting_level_left
;
unsigned
int
lookup_
flag
;
unsigned
int
lookup_
props
;
unsigned
int
property
;
/* propety of first glyph */
...
...
@@ -126,7 +126,7 @@ static inline bool match_input (hb_apply_context_t *c,
for
(
i
=
1
,
j
=
c
->
buffer
->
i
+
1
;
i
<
count
;
i
++
,
j
++
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
+
count
-
i
==
end
))
return
false
;
...
...
@@ -153,7 +153,7 @@ static inline bool match_backtrack (hb_apply_context_t *c,
for
(
unsigned
int
i
=
0
,
j
=
c
->
buffer
->
out_len
-
1
;
i
<
count
;
i
++
,
j
--
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
out_info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
out_info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
+
1
==
count
-
i
))
return
false
;
...
...
@@ -181,7 +181,7 @@ static inline bool match_lookahead (hb_apply_context_t *c,
for
(
i
=
0
,
j
=
c
->
buffer
->
i
+
offset
;
i
<
count
;
i
++
,
j
++
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
j
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
j
+
count
-
i
==
end
))
return
false
;
...
...
@@ -235,7 +235,7 @@ static inline bool apply_lookup (hb_apply_context_t *c,
*/
for
(
unsigned
int
i
=
0
;
i
<
count
;
/* NOP */
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
flag
,
NULL
))
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
info
[
c
->
buffer
->
i
],
c
->
lookup_
props
,
NULL
))
{
if
(
unlikely
(
c
->
buffer
->
i
==
end
))
return
true
;
...
...
src/hb-ot-layout-private.hh
浏览文件 @
8c69e65a
...
...
@@ -97,13 +97,13 @@ _hb_ot_layout_free (hb_ot_layout_t *layout);
HB_INTERNAL
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_
flag
s
,
unsigned
int
lookup_
prop
s
,
unsigned
int
*
property
);
HB_INTERNAL
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_
flag
s
,
unsigned
int
lookup_
prop
s
,
unsigned
int
*
property
);
...
...
src/hb-ot-layout.cc
浏览文件 @
8c69e65a
...
...
@@ -138,7 +138,7 @@ _hb_ot_layout_get_glyph_property (hb_face_t *face,
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_
flag
s
,
unsigned
int
lookup_
prop
s
,
unsigned
int
*
property_out
)
{
unsigned
int
property
;
...
...
@@ -148,25 +148,25 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face,
*
property_out
=
property
;
/* Not covered, if, for example, glyph class is ligature and
* lookup_
flag
s includes LookupFlags::IgnoreLigatures
* lookup_
prop
s includes LookupFlags::IgnoreLigatures
*/
if
(
property
&
lookup_
flag
s
&
LookupFlag
::
IgnoreFlags
)
if
(
property
&
lookup_
prop
s
&
LookupFlag
::
IgnoreFlags
)
return
false
;
if
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
{
/* If using mark filtering sets, the high short of
* lookup_
flag
s has the set index.
* lookup_
prop
s has the set index.
*/
if
(
lookup_
flag
s
&
LookupFlag
::
UseMarkFilteringSet
)
return
_get_gdef
(
face
).
mark_set_covers
(
lookup_
flag
s
>>
16
,
ginfo
->
codepoint
);
if
(
lookup_
prop
s
&
LookupFlag
::
UseMarkFilteringSet
)
return
_get_gdef
(
face
).
mark_set_covers
(
lookup_
prop
s
>>
16
,
ginfo
->
codepoint
);
/* The second byte of lookup_
flag
s has the meaning
/* The second byte of lookup_
prop
s has the meaning
* "ignore marks of attachment type different than
* the attachment type specified."
*/
if
(
lookup_
flag
s
&
LookupFlag
::
MarkAttachmentType
&&
property
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_
flag
s
&
LookupFlag
::
MarkAttachmentType
)
==
(
property
&
LookupFlag
::
MarkAttachmentType
);
if
(
lookup_
prop
s
&
LookupFlag
::
MarkAttachmentType
&&
property
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_
prop
s
&
LookupFlag
::
MarkAttachmentType
)
==
(
property
&
LookupFlag
::
MarkAttachmentType
);
}
return
true
;
...
...
@@ -175,7 +175,7 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face,
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_
flag
s
,
unsigned
int
lookup_
prop
s
,
unsigned
int
*
property_out
)
{
unsigned
int
property
;
...
...
@@ -186,18 +186,18 @@ _hb_ot_layout_skip_mark (hb_face_t *face,
if
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
{
/* Skip mark if lookup_
flag
s includes LookupFlags::IgnoreMarks */
if
(
lookup_
flag
s
&
LookupFlag
::
IgnoreMarks
)
/* Skip mark if lookup_
prop
s includes LookupFlags::IgnoreMarks */
if
(
lookup_
prop
s
&
LookupFlag
::
IgnoreMarks
)
return
true
;
/* If using mark filtering sets, the high short of lookup_
flag
s has the set index. */
if
(
lookup_
flag
s
&
LookupFlag
::
UseMarkFilteringSet
)
return
!
_get_gdef
(
face
).
mark_set_covers
(
lookup_
flag
s
>>
16
,
ginfo
->
codepoint
);
/* If using mark filtering sets, the high short of lookup_
prop
s has the set index. */
if
(
lookup_
prop
s
&
LookupFlag
::
UseMarkFilteringSet
)
return
!
_get_gdef
(
face
).
mark_set_covers
(
lookup_
prop
s
>>
16
,
ginfo
->
codepoint
);
/* The second byte of lookup_
flag
s has the meaning "ignore marks of attachment type
/* The second byte of lookup_
prop
s has the meaning "ignore marks of attachment type
* different than the attachment type specified." */
if
(
lookup_
flag
s
&
LookupFlag
::
MarkAttachmentType
&&
property
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_
flag
s
&
LookupFlag
::
MarkAttachmentType
)
!=
(
property
&
LookupFlag
::
MarkAttachmentType
);
if
(
lookup_
prop
s
&
LookupFlag
::
MarkAttachmentType
&&
property
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_
prop
s
&
LookupFlag
::
MarkAttachmentType
)
!=
(
property
&
LookupFlag
::
MarkAttachmentType
);
}
return
false
;
...
...
src/main.cc
浏览文件 @
8c69e65a
...
...
@@ -161,8 +161,8 @@ main (int argc, char **argv)
printf
(
" %d lookup(s) found in table
\n
"
,
num_lookups
);
for
(
int
n_lookup
=
0
;
n_lookup
<
num_lookups
;
n_lookup
++
)
{
const
Lookup
&
lookup
=
g
.
get_lookup
(
n_lookup
);
printf
(
" Lookup %2d of %2d: type %d,
flag
s 0x%04X
\n
"
,
n_lookup
,
num_lookups
,
lookup
.
get_type
(),
lookup
.
get_
flag
());
printf
(
" Lookup %2d of %2d: type %d,
prop
s 0x%04X
\n
"
,
n_lookup
,
num_lookups
,
lookup
.
get_type
(),
lookup
.
get_
props
());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录