Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
03f67bc0
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看板
提交
03f67bc0
编写于
7月 30, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More refactoring glyph class access
上级
300c7307
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
76 addition
and
82 deletion
+76
-82
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+1
-1
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+1
-1
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+74
-80
未找到文件。
src/hb-ot-layout-gpos-table.hh
浏览文件 @
03f67bc0
...
...
@@ -1515,7 +1515,7 @@ struct PosLookup : Lookup
{
unsigned
int
lookup_type
=
get_type
();
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
face
,
&
c
->
buffer
->
cur
(),
c
->
lookup_props
,
&
c
->
property
))
if
(
!
c
->
check_glyph_property
(
&
c
->
buffer
->
cur
(),
c
->
lookup_props
,
&
c
->
property
))
return
false
;
unsigned
int
count
=
get_subtable_count
();
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
03f67bc0
...
...
@@ -1179,7 +1179,7 @@ struct SubstLookup : Lookup
{
unsigned
int
lookup_type
=
get_type
();
if
(
!
_hb_ot_layout_check_glyph_property
(
c
->
face
,
&
c
->
buffer
->
cur
(),
c
->
lookup_props
,
&
c
->
property
))
if
(
!
c
->
check_glyph_property
(
&
c
->
buffer
->
cur
(),
c
->
lookup_props
,
&
c
->
property
))
return
false
;
unsigned
int
count
=
get_subtable_count
();
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
03f67bc0
...
...
@@ -96,82 +96,6 @@ struct hb_would_apply_context_t
hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->idx, c->buffer->cur().codepoint);
static
inline
hb_bool_t
_hb_ot_layout_match_properties_mark
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
,
unsigned
int
glyph_props
,
unsigned
int
lookup_props
)
{
/* If using mark filtering sets, the high short of
* lookup_props has the set index.
*/
if
(
lookup_props
&
LookupFlag
::
UseMarkFilteringSet
)
return
hb_ot_layout_from_face
(
face
)
->
gdef
->
mark_set_covers
(
lookup_props
>>
16
,
glyph
);
/* The second byte of lookup_props has the meaning
* "ignore marks of attachment type different than
* the attachment type specified."
*/
if
(
lookup_props
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_props
&
LookupFlag
::
MarkAttachmentType
)
==
(
glyph_props
&
LookupFlag
::
MarkAttachmentType
);
return
true
;
}
static
inline
hb_bool_t
_hb_ot_layout_match_properties
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
,
unsigned
int
glyph_props
,
unsigned
int
lookup_props
)
{
/* Not covered, if, for example, glyph class is ligature and
* lookup_props includes LookupFlags::IgnoreLigatures
*/
if
(
glyph_props
&
lookup_props
&
LookupFlag
::
IgnoreFlags
)
return
false
;
if
(
unlikely
(
glyph_props
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
))
return
_hb_ot_layout_match_properties_mark
(
face
,
glyph
,
glyph_props
,
lookup_props
);
return
true
;
}
static
inline
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_props
,
unsigned
int
*
property_out
)
{
unsigned
int
property
;
property
=
ginfo
->
props_cache
();
*
property_out
=
property
;
return
_hb_ot_layout_match_properties
(
face
,
ginfo
->
codepoint
,
property
,
lookup_props
);
}
static
inline
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_props
,
unsigned
int
*
property_out
)
{
unsigned
int
property
;
property
=
ginfo
->
props_cache
();
if
(
property_out
)
*
property_out
=
property
;
/* If it's a mark, skip it if we don't accept it. */
if
(
unlikely
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
))
return
!
_hb_ot_layout_match_properties
(
face
,
ginfo
->
codepoint
,
property
,
lookup_props
);
/* If not a mark, don't skip. */
return
false
;
}
struct
hb_apply_context_t
{
hb_font_t
*
font
;
...
...
@@ -236,7 +160,7 @@ struct hb_apply_context_t
if
(
has_no_chance
())
return
false
;
idx
++
;
}
while
(
_hb_ot_layout_skip_mark
(
c
->
face
,
&
c
->
buffer
->
info
[
idx
],
lookup_props
,
property_out
));
}
while
(
c
->
should_skip_mark
(
&
c
->
buffer
->
info
[
idx
],
lookup_props
,
property_out
));
num_items
--
;
return
(
c
->
buffer
->
info
[
idx
].
mask
&
mask
)
&&
(
!
syllable
||
syllable
==
c
->
buffer
->
info
[
idx
].
syllable
());
}
...
...
@@ -285,7 +209,7 @@ struct hb_apply_context_t
if
(
has_no_chance
())
return
false
;
idx
--
;
}
while
(
_hb_ot_layout_skip_mark
(
c
->
face
,
&
c
->
buffer
->
out_info
[
idx
],
lookup_props
,
property_out
));
}
while
(
c
->
should_skip_mark
(
&
c
->
buffer
->
out_info
[
idx
],
lookup_props
,
property_out
));
num_items
--
;
return
(
c
->
buffer
->
out_info
[
idx
].
mask
&
mask
)
&&
(
!
syllable
||
syllable
==
c
->
buffer
->
out_info
[
idx
].
syllable
());
}
...
...
@@ -302,10 +226,80 @@ struct hb_apply_context_t
uint8_t
syllable
;
};
inline
bool
should_mark_skip_current_glyph
(
void
)
const
inline
bool
match_properties_mark
(
hb_codepoint_t
glyph
,
unsigned
int
glyph_props
,
unsigned
int
lookup_props
)
const
{
/* If using mark filtering sets, the high short of
* lookup_props has the set index.
*/
if
(
lookup_props
&
LookupFlag
::
UseMarkFilteringSet
)
return
gdef
.
mark_set_covers
(
lookup_props
>>
16
,
glyph
);
/* The second byte of lookup_props has the meaning
* "ignore marks of attachment type different than
* the attachment type specified."
*/
if
(
lookup_props
&
LookupFlag
::
MarkAttachmentType
)
return
(
lookup_props
&
LookupFlag
::
MarkAttachmentType
)
==
(
glyph_props
&
LookupFlag
::
MarkAttachmentType
);
return
true
;
}
inline
bool
match_properties
(
hb_codepoint_t
glyph
,
unsigned
int
glyph_props
,
unsigned
int
lookup_props
)
const
{
/* Not covered, if, for example, glyph class is ligature and
* lookup_props includes LookupFlags::IgnoreLigatures
*/
if
(
glyph_props
&
lookup_props
&
LookupFlag
::
IgnoreFlags
)
return
false
;
if
(
unlikely
(
glyph_props
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
))
return
match_properties_mark
(
glyph
,
glyph_props
,
lookup_props
);
return
true
;
}
inline
bool
check_glyph_property
(
hb_glyph_info_t
*
info
,
unsigned
int
lookup_props
,
unsigned
int
*
property_out
)
const
{
unsigned
int
property
;
return
_hb_ot_layout_skip_mark
(
face
,
&
buffer
->
cur
(),
lookup_props
,
&
property
);
property
=
info
->
props_cache
();
*
property_out
=
property
;
return
match_properties
(
info
->
codepoint
,
property
,
lookup_props
);
}
inline
bool
should_skip_mark
(
hb_glyph_info_t
*
info
,
unsigned
int
lookup_props
,
unsigned
int
*
property_out
)
const
{
unsigned
int
property
;
property
=
info
->
props_cache
();
if
(
property_out
)
*
property_out
=
property
;
/* If it's a mark, skip it if we don't accept it. */
if
(
unlikely
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
))
return
!
match_properties
(
info
->
codepoint
,
property
,
lookup_props
);
/* If not a mark, don't skip. */
return
false
;
}
inline
bool
should_mark_skip_current_glyph
(
void
)
const
{
return
should_skip_mark
(
&
buffer
->
cur
(),
lookup_props
,
NULL
);
}
inline
void
set_class
(
hb_codepoint_t
glyph_index
,
unsigned
int
class_guess
)
const
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录