Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
67bb9e8c
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
67bb9e8c
编写于
6月 09, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add set add_coverage() to Coverage()
上级
4952f0aa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
0 deletion
+29
-0
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+24
-0
src/hb-set-private.hh
src/hb-set-private.hh
+5
-0
未找到文件。
src/hb-ot-layout-common-private.hh
浏览文件 @
67bb9e8c
...
@@ -134,6 +134,10 @@ struct RangeRecord
...
@@ -134,6 +134,10 @@ struct RangeRecord
return
glyphs
->
intersects
(
start
,
end
);
return
glyphs
->
intersects
(
start
,
end
);
}
}
inline
void
add_coverage
(
hb_set_t
*
glyphs
)
const
{
glyphs
->
add_range
(
start
,
end
);
}
GlyphID
start
;
/* First GlyphID in the range */
GlyphID
start
;
/* First GlyphID in the range */
GlyphID
end
;
/* Last GlyphID in the range */
GlyphID
end
;
/* Last GlyphID in the range */
USHORT
value
;
/* Value */
USHORT
value
;
/* Value */
...
@@ -357,6 +361,12 @@ struct CoverageFormat1
...
@@ -357,6 +361,12 @@ struct CoverageFormat1
return
glyphs
->
has
(
glyphArray
[
index
]);
return
glyphs
->
has
(
glyphArray
[
index
]);
}
}
inline
void
add_coverage
(
hb_set_t
*
glyphs
)
const
{
unsigned
int
count
=
glyphArray
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
glyphs
->
add
(
glyphArray
[
i
]);
}
struct
Iter
{
struct
Iter
{
inline
void
init
(
const
struct
CoverageFormat1
&
c_
)
{
c
=
&
c_
;
i
=
0
;
};
inline
void
init
(
const
struct
CoverageFormat1
&
c_
)
{
c
=
&
c_
;
i
=
0
;
};
inline
bool
more
(
void
)
{
return
i
<
c
->
glyphArray
.
len
;
}
inline
bool
more
(
void
)
{
return
i
<
c
->
glyphArray
.
len
;
}
...
@@ -412,6 +422,12 @@ struct CoverageFormat2
...
@@ -412,6 +422,12 @@ struct CoverageFormat2
return
false
;
return
false
;
}
}
inline
void
add_coverage
(
hb_set_t
*
glyphs
)
const
{
unsigned
int
count
=
rangeRecord
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
rangeRecord
[
i
].
add_coverage
(
glyphs
);
}
struct
Iter
{
struct
Iter
{
inline
void
init
(
const
CoverageFormat2
&
c_
)
{
inline
void
init
(
const
CoverageFormat2
&
c_
)
{
c
=
&
c_
;
c
=
&
c_
;
...
@@ -489,6 +505,14 @@ struct Coverage
...
@@ -489,6 +505,14 @@ struct Coverage
}
}
}
}
inline
void
add_coverage
(
hb_set_t
*
glyphs
)
const
{
switch
(
u
.
format
)
{
case
1
:
u
.
format1
.
add_coverage
(
glyphs
);
break
;
case
2
:
u
.
format2
.
add_coverage
(
glyphs
);
break
;
default:
break
;
}
}
struct
Iter
{
struct
Iter
{
Iter
(
void
)
:
format
(
0
)
{};
Iter
(
void
)
:
format
(
0
)
{};
inline
void
init
(
const
Coverage
&
c_
)
{
inline
void
init
(
const
Coverage
&
c_
)
{
...
...
src/hb-set-private.hh
浏览文件 @
67bb9e8c
...
@@ -60,6 +60,11 @@ struct _hb_set_t
...
@@ -60,6 +60,11 @@ struct _hb_set_t
if
(
unlikely
(
g
>
MAX_G
))
return
;
if
(
unlikely
(
g
>
MAX_G
))
return
;
elt
(
g
)
|=
mask
(
g
);
elt
(
g
)
|=
mask
(
g
);
}
}
inline
void
add_range
(
hb_codepoint_t
a
,
hb_codepoint_t
b
)
{
for
(
unsigned
int
i
=
a
;
i
<
b
+
1
;
i
++
)
add
(
i
);
}
inline
void
del
(
hb_codepoint_t
g
)
inline
void
del
(
hb_codepoint_t
g
)
{
{
if
(
unlikely
(
g
>
MAX_G
))
return
;
if
(
unlikely
(
g
>
MAX_G
))
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录