Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
aa7044de
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,发现更多精彩内容 >>
提交
aa7044de
编写于
11月 04, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Generalize flags types
上级
7793aad9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
19 deletion
+29
-19
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+3
-0
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+5
-0
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+5
-3
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+1
-15
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
src/hb-private.hh
src/hb-private.hh
+14
-0
未找到文件。
src/hb-buffer-private.hh
浏览文件 @
aa7044de
...
...
@@ -38,6 +38,9 @@
ASSERT_STATIC
(
sizeof
(
hb_glyph_info_t
)
==
20
);
ASSERT_STATIC
(
sizeof
(
hb_glyph_info_t
)
==
sizeof
(
hb_glyph_position_t
));
template
<
>
class
hb_mark_as_flags_t
<
hb_buffer_flags_t
>
{};
template
<
>
class
hb_mark_as_flags_t
<
hb_buffer_serialize_flags_t
>
{};
/*
* hb_buffer_t
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
aa7044de
...
...
@@ -579,6 +579,11 @@ struct LookupFlag : USHORT
DEFINE_SIZE_STATIC
(
2
);
};
}
/* namespace OT */
/* This has to be outside the namespace. */
template
<
>
class
hb_mark_as_flags_t
<
OT
::
LookupFlag
::
Flags
>
{};
namespace
OT
{
struct
Lookup
{
inline
unsigned
int
get_subtable_count
(
void
)
const
{
return
subTable
.
len
;
}
...
...
src/hb-ot-layout-private.hh
浏览文件 @
aa7044de
...
...
@@ -49,7 +49,7 @@ hb_ot_layout_table_find_feature (hb_face_t *face,
* GDEF
*/
typedef
enum
enum
hb_ot_layout_glyph_props_flags_t
{
/* The following three match LookupFlags::Ignore* numbers. */
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
=
0x02u
,
...
...
@@ -64,7 +64,8 @@ typedef enum
HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE
=
HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED
|
HB_OT_LAYOUT_GLYPH_PROPS_LIGATED
|
HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED
}
hb_ot_layout_glyph_class_mask_t
;
};
template
<
>
class
hb_mark_as_flags_t
<
hb_ot_layout_glyph_props_flags_t
>
{};
/*
...
...
@@ -230,12 +231,13 @@ _next_syllable (hb_buffer_t *buffer, unsigned int start)
* freeing two more bits.
*/
enum
{
enum
hb_unicode_props_flags_t
{
UPROPS_MASK_ZWJ
=
0x20u
,
UPROPS_MASK_ZWNJ
=
0x40u
,
UPROPS_MASK_IGNORABLE
=
0x80u
,
UPROPS_MASK_GEN_CAT
=
0x1Fu
};
template
<
>
class
hb_mark_as_flags_t
<
hb_unicode_props_flags_t
>
{};
static
inline
void
_hb_glyph_info_set_unicode_props
(
hb_glyph_info_t
*
info
,
hb_unicode_funcs_t
*
unicode
)
...
...
src/hb-ot-map-private.hh
浏览文件 @
aa7044de
...
...
@@ -159,23 +159,9 @@ enum hb_ot_map_feature_flags_t {
F_MANUAL_ZWJ
=
0x0004u
,
/* Don't skip over ZWJ when matching. */
F_GLOBAL_SEARCH
=
0x0008u
/* If feature not found in LangSys, look for it in global feature list and pick one. */
};
template
<
>
class
hb_mark_as_flags_t
<
hb_ot_map_feature_flags_t
>
{};
/* Macro version for where const is desired. */
#define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigned int) (r)))
static
inline
hb_ot_map_feature_flags_t
operator
|
(
hb_ot_map_feature_flags_t
l
,
hb_ot_map_feature_flags_t
r
)
{
return
hb_ot_map_feature_flags_t
((
unsigned
int
)
l
|
(
unsigned
int
)
r
);
}
static
inline
hb_ot_map_feature_flags_t
operator
&
(
hb_ot_map_feature_flags_t
l
,
hb_ot_map_feature_flags_t
r
)
{
return
hb_ot_map_feature_flags_t
((
unsigned
int
)
l
&
(
unsigned
int
)
r
);
}
static
inline
hb_ot_map_feature_flags_t
operator
~
(
hb_ot_map_feature_flags_t
r
)
{
return
hb_ot_map_feature_flags_t
(
~
(
unsigned
int
)
r
);
}
static
inline
hb_ot_map_feature_flags_t
&
operator
|=
(
hb_ot_map_feature_flags_t
&
l
,
hb_ot_map_feature_flags_t
r
)
{
l
=
l
|
r
;
return
l
;
}
static
inline
hb_ot_map_feature_flags_t
&
operator
&=
(
hb_ot_map_feature_flags_t
&
l
,
hb_ot_map_feature_flags_t
r
)
{
l
=
l
&
r
;
return
l
;
}
struct
hb_ot_map_builder_t
...
...
src/hb-ot-shape.cc
浏览文件 @
aa7044de
...
...
@@ -525,7 +525,7 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
hb_glyph_info_t
*
info
=
c
->
buffer
->
info
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
hb_ot_layout_glyph_
class_mask
_t
klass
;
hb_ot_layout_glyph_
props_flags
_t
klass
;
/* Never mark default-ignorables as marks.
* They won't get in the way of lookups anyway,
...
...
src/hb-private.hh
浏览文件 @
aa7044de
...
...
@@ -891,6 +891,20 @@ hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
}
/* Enable bitwise ops on enums marked as flags_t */
template
<
class
T
>
class
hb_mark_as_flags_t
;
template
<
class
T
>
static
inline
T
operator
|
(
T
l
,
T
r
)
{
hb_mark_as_flags_t
<
T
>
unused
HB_UNUSED
;
return
T
((
unsigned
int
)
l
|
(
unsigned
int
)
r
);
}
template
<
class
T
>
static
inline
T
operator
&
(
T
l
,
T
r
)
{
hb_mark_as_flags_t
<
T
>
unused
HB_UNUSED
;
return
T
((
unsigned
int
)
l
&
(
unsigned
int
)
r
);
}
template
<
class
T
>
static
inline
T
operator
~
(
T
r
)
{
hb_mark_as_flags_t
<
T
>
unused
HB_UNUSED
;
return
T
(
~
(
unsigned
int
)
r
);
}
template
<
class
T
>
static
inline
T
&
operator
|=
(
T
&
l
,
T
r
)
{
hb_mark_as_flags_t
<
T
>
unused
HB_UNUSED
;
l
=
l
|
r
;
return
l
;
}
template
<
class
T
>
static
inline
T
&
operator
&=
(
T
&
l
,
T
r
)
{
hb_mark_as_flags_t
<
T
>
unused
HB_UNUSED
;
l
=
l
&
r
;
return
l
;
}
/* Useful for set-operations on small enums.
* For example, for testing "x ∈ {x1, x2, x3}" use:
* (FLAG_SAFE(x) & (FLAG(x1) | FLAG(x2) | FLAG(x3)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录