Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0712e915
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看板
提交
0712e915
编写于
10月 29, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove hb_compare_func_t
上级
538da749
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
19 deletion
+28
-19
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+13
-5
src/hb-ot-name-table.hh
src/hb-ot-name-table.hh
+1
-1
src/hb-ot-tag.cc
src/hb-ot-tag.cc
+5
-3
src/hb-ot-var-mvar-table.hh
src/hb-ot-var-mvar-table.hh
+7
-3
src/hb-private.hh
src/hb-private.hh
+2
-7
未找到文件。
src/hb-ot-map-private.hh
浏览文件 @
0712e915
...
...
@@ -63,8 +63,12 @@ struct hb_ot_map_t
unsigned
short
auto_zwj
:
1
;
hb_mask_t
mask
;
static
int
cmp
(
const
lookup_map_t
*
a
,
const
lookup_map_t
*
b
)
{
return
a
->
index
<
b
->
index
?
-
1
:
a
->
index
>
b
->
index
?
1
:
0
;
}
static
int
cmp
(
const
void
*
pa
,
const
void
*
pb
)
{
const
lookup_map_t
*
a
=
(
const
lookup_map_t
*
)
pa
;
const
lookup_map_t
*
b
=
(
const
lookup_map_t
*
)
pb
;
return
a
->
index
<
b
->
index
?
-
1
:
a
->
index
>
b
->
index
?
1
:
0
;
}
};
typedef
void
(
*
pause_func_t
)
(
const
struct
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
...
...
@@ -210,9 +214,13 @@ struct hb_ot_map_builder_t
unsigned
int
default_value
;
/* for non-global features, what should the unset glyphs take */
unsigned
int
stage
[
2
];
/* GSUB/GPOS */
static
int
cmp
(
const
feature_info_t
*
a
,
const
feature_info_t
*
b
)
{
return
(
a
->
tag
!=
b
->
tag
)
?
(
a
->
tag
<
b
->
tag
?
-
1
:
1
)
:
(
a
->
seq
<
b
->
seq
?
-
1
:
a
->
seq
>
b
->
seq
?
1
:
0
);
}
static
int
cmp
(
const
void
*
pa
,
const
void
*
pb
)
{
const
feature_info_t
*
a
=
(
const
feature_info_t
*
)
pa
;
const
feature_info_t
*
b
=
(
const
feature_info_t
*
)
pb
;
return
(
a
->
tag
!=
b
->
tag
)
?
(
a
->
tag
<
b
->
tag
?
-
1
:
1
)
:
(
a
->
seq
<
b
->
seq
?
-
1
:
a
->
seq
>
b
->
seq
?
1
:
0
);
}
};
struct
stage_info_t
{
...
...
src/hb-ot-name-table.hh
浏览文件 @
0712e915
...
...
@@ -89,7 +89,7 @@ struct name
key
.
encodingID
.
set
(
encoding_id
);
key
.
languageID
.
set
(
language_id
);
key
.
nameID
.
set
(
name_id
);
NameRecord
*
match
=
(
NameRecord
*
)
bsearch
(
&
key
,
nameRecord
,
count
,
sizeof
(
nameRecord
[
0
]),
(
hb_compare_func_t
)
NameRecord
::
cmp
);
NameRecord
*
match
=
(
NameRecord
*
)
bsearch
(
&
key
,
nameRecord
,
count
,
sizeof
(
nameRecord
[
0
]),
NameRecord
::
cmp
);
if
(
!
match
)
return
0
;
...
...
src/hb-ot-tag.cc
浏览文件 @
0712e915
...
...
@@ -879,9 +879,11 @@ static const LangTagLong ot_languages_zh[] = {
};
static
int
lang_compare_first_component
(
const
char
*
a
,
const
char
*
b
)
lang_compare_first_component
(
const
void
*
p
a
,
const
void
*
p
b
)
{
const
char
*
a
=
(
const
char
*
)
pa
;
const
char
*
b
=
(
const
char
*
)
pb
;
unsigned
int
da
,
db
;
const
char
*
p
;
...
...
@@ -972,7 +974,7 @@ hb_ot_tag_from_language (hb_language_t language)
const
LangTag
*
lang_tag
;
lang_tag
=
(
LangTag
*
)
bsearch
(
lang_str
,
ot_languages
,
ARRAY_LENGTH
(
ot_languages
),
sizeof
(
LangTag
),
(
hb_compare_func_t
)
lang_compare_first_component
);
lang_compare_first_component
);
if
(
lang_tag
)
return
lang_tag
->
tag
;
}
...
...
src/hb-ot-var-mvar-table.hh
浏览文件 @
0712e915
...
...
@@ -77,7 +77,7 @@ struct MVAR
const
VariationValueRecord
*
record
;
record
=
(
VariationValueRecord
*
)
bsearch
(
&
tag
,
values
,
valueRecordCount
,
valueRecordSize
,
(
hb_compare_func_t
)
tag_compare
);
tag_compare
);
if
(
!
record
)
return
0.
;
...
...
@@ -85,8 +85,12 @@ struct MVAR
}
protected:
static
inline
int
tag_compare
(
const
hb_tag_t
*
a
,
const
Tag
*
b
)
{
return
b
->
cmp
(
*
a
);
}
static
inline
int
tag_compare
(
const
void
*
pa
,
const
void
*
pb
)
{
const
hb_tag_t
*
a
=
(
const
hb_tag_t
*
)
pa
;
const
Tag
*
b
=
(
const
Tag
*
)
pb
;
return
b
->
cmp
(
*
a
);
}
protected:
FixedVersion
<>
version
;
/* Version of the metrics variation table
...
...
src/hb-private.hh
浏览文件 @
0712e915
...
...
@@ -372,11 +372,6 @@ _hb_unsigned_int_mul_overflows (unsigned int count, unsigned int size)
}
/* Type of bsearch() / qsort() compare function */
typedef
int
(
*
hb_compare_func_t
)
(
const
void
*
,
const
void
*
);
/* arrays and maps */
...
...
@@ -480,12 +475,12 @@ struct hb_prealloced_array_t
inline
void
qsort
(
void
)
{
::
qsort
(
array
,
len
,
sizeof
(
Type
),
(
hb_compare_func_t
)
Type
::
cmp
);
::
qsort
(
array
,
len
,
sizeof
(
Type
),
Type
::
cmp
);
}
inline
void
qsort
(
unsigned
int
start
,
unsigned
int
end
)
{
::
qsort
(
array
+
start
,
end
-
start
,
sizeof
(
Type
),
(
hb_compare_func_t
)
Type
::
cmp
);
::
qsort
(
array
+
start
,
end
-
start
,
sizeof
(
Type
),
Type
::
cmp
);
}
template
<
typename
T
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录