Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c4473359
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看板
提交
c4473359
编写于
2月 18, 2008
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hb-ot-layout] Add proper namespace to accessors
上级
57225672
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
198 addition
and
82 deletion
+198
-82
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+122
-43
src/hb-ot-layout.h
src/hb-ot-layout.h
+76
-39
未找到文件。
src/hb-ot-layout.cc
浏览文件 @
c4473359
...
...
@@ -278,8 +278,8 @@ get_gsubgpos_table (hb_ot_layout_t *layout,
unsigned
int
hb_ot_layout_get_script_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
)
hb_ot_layout_
table_
get_script_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
...
...
@@ -287,9 +287,9 @@ hb_ot_layout_get_script_count (hb_ot_layout_t *layout,
}
hb_tag_t
hb_ot_layout_get_script_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
)
hb_ot_layout_
table_
get_script_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
...
...
@@ -297,10 +297,10 @@ hb_ot_layout_get_script_tag (hb_ot_layout_t *layout,
}
hb_bool_t
hb_ot_layout_find_script
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
hb_tag_t
script_tag
,
unsigned
int
*
script_index
)
hb_ot_layout_
table_
find_script
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
hb_tag_t
script_tag
,
unsigned
int
*
script_index
)
{
ASSERT_STATIC
(
NO_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
...
...
@@ -320,11 +320,55 @@ hb_ot_layout_find_script (hb_ot_layout_t *layout,
return
FALSE
;
}
unsigned
int
hb_ot_layout_get_language_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
return
g
.
get_feature_count
();
}
hb_tag_t
hb_ot_layout_table_get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
return
g
.
get_feature_tag
(
feature_index
);
}
hb_bool_t
hb_ot_layout_table_find_feature
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
)
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
)
{
ASSERT_STATIC
(
NO_INDEX
==
HB_OT_LAYOUT_NO_FEATURE_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
if
(
g
.
find_feature_index
(
feature_tag
,
feature_index
))
return
TRUE
;
if
(
feature_index
)
*
feature_index
=
HB_OT_LAYOUT_NO_FEATURE_INDEX
;
return
FALSE
;
}
unsigned
int
hb_ot_layout_table_get_lookup_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
return
g
.
get_lookup_count
();
}
unsigned
int
hb_ot_layout_script_get_language_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
)
{
const
Script
&
s
=
get_gsubgpos_table
(
layout
,
table_type
).
get_script
(
script_index
);
...
...
@@ -332,10 +376,10 @@ hb_ot_layout_get_language_count (hb_ot_layout_t *layout,
}
hb_tag_t
hb_ot_layout_get_language_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
)
hb_ot_layout_
script_
get_language_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
)
{
const
Script
&
s
=
get_gsubgpos_table
(
layout
,
table_type
).
get_script
(
script_index
);
...
...
@@ -343,11 +387,11 @@ hb_ot_layout_get_language_tag (hb_ot_layout_t *layout,
}
hb_bool_t
hb_ot_layout_find_language
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
hb_tag_t
language_tag
,
unsigned
int
*
language_index
)
hb_ot_layout_
script_
find_language
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
hb_tag_t
language_tag
,
unsigned
int
*
language_index
)
{
ASSERT_STATIC
(
NO_INDEX
==
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
);
const
Script
&
s
=
get_gsubgpos_table
(
layout
,
table_type
).
get_script
(
script_index
);
...
...
@@ -364,11 +408,11 @@ hb_ot_layout_find_language (hb_ot_layout_t *layout,
}
hb_bool_t
hb_ot_layout_get_required_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
*
feature_index
)
hb_ot_layout_
language_
get_required_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
*
feature_index
)
{
const
LangSys
&
l
=
get_gsubgpos_table
(
layout
,
table_type
).
get_script
(
script_index
).
get_lang_sys
(
language_index
);
...
...
@@ -378,39 +422,51 @@ hb_ot_layout_get_required_feature_index (hb_ot_layout_t *layout,
}
unsigned
int
hb_ot_layout_get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
)
hb_ot_layout_
language_
get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
)
{
const
LangSys
&
l
=
get_gsubgpos_table
(
layout
,
table_type
).
get_script
(
script_index
).
get_lang_sys
(
language_index
);
return
l
.
get_feature_count
();
}
hb_tag_
t
hb_ot_layout_
get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
feature_index
)
unsigned
in
t
hb_ot_layout_
language_get_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
num_feature
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
const
LangSys
&
l
=
g
.
get_script
(
script_index
).
get_lang_sys
(
language_index
);
feature_index
=
l
.
get_feature_index
(
feature_index
);
return
l
.
get_feature_index
(
num_feature
);
}
hb_tag_t
hb_ot_layout_language_get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
num_feature
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
const
LangSys
&
l
=
g
.
get_script
(
script_index
).
get_lang_sys
(
language_index
);
unsigned
int
feature_index
=
l
.
get_feature_index
(
num_feature
);
return
g
.
get_feature_tag
(
feature_index
);
}
hb_bool_t
hb_ot_layout_find_feature
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
)
hb_ot_layout_
language_
find_feature
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
)
{
ASSERT_STATIC
(
NO_INDEX
==
HB_OT_LAYOUT_NO_FEATURE_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
...
...
@@ -429,3 +485,26 @@ hb_ot_layout_find_feature (hb_ot_layout_t *layout,
if
(
feature_index
)
*
feature_index
=
HB_OT_LAYOUT_NO_FEATURE_INDEX
;
return
FALSE
;
}
unsigned
int
hb_ot_layout_feature_get_lookup_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
const
Feature
&
f
=
g
.
get_feature
(
feature_index
);
return
f
.
get_lookup_count
();
}
unsigned
int
hb_ot_layout_feature_get_lookup_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
,
unsigned
int
num_lookup
)
{
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
layout
,
table_type
);
const
Feature
&
f
=
g
.
get_feature
(
feature_index
);
return
f
.
get_lookup_index
(
num_lookup
);
}
src/hb-ot-layout.h
浏览文件 @
c4473359
...
...
@@ -98,65 +98,102 @@ typedef enum {
#define HB_OT_LAYOUT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't')
unsigned
int
hb_ot_layout_get_script_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
);
hb_ot_layout_
table_
get_script_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
);
hb_tag_t
hb_ot_layout_get_script_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
);
hb_ot_layout_
table_
get_script_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
);
hb_bool_t
hb_ot_layout_find_script
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
hb_tag_t
script_tag
,
unsigned
int
*
script_index
);
hb_ot_layout_
table_
find_script
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
hb_tag_t
script_tag
,
unsigned
int
*
script_index
);
unsigned
int
hb_ot_layout_get_language_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
);
hb_ot_layout_table_get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
);
hb_tag_t
hb_ot_layout_get_language_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
);
hb_ot_layout_table_get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
);
hb_bool_t
hb_ot_layout_find_language
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
hb_tag_t
language_tag
,
unsigned
int
*
language_index
);
hb_ot_layout_table_find_script
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
);
unsigned
int
hb_ot_layout_table_get_lookup_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
);
unsigned
int
hb_ot_layout_script_get_language_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
);
hb_tag_t
hb_ot_layout_script_get_language_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
);
hb_bool_t
hb_ot_layout_get_required_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_script_find_language
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
hb_tag_t
language_tag
,
unsigned
int
*
language_index
);
hb_bool_t
hb_ot_layout_language_get_required_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
*
feature_index
);
unsigned
int
hb_ot_layout_language_get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
*
feature_index
);
unsigned
int
language_index
);
unsigned
int
hb_ot_layout_get_feature_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
);
hb_ot_layout_language_get_feature_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
num_feature
);
hb_tag_t
hb_ot_layout_get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
feature_index
);
hb_ot_layout_
language_
get_feature_tag
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
unsigned
int
num_feature
);
hb_bool_t
hb_ot_layout_find_feature
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
);
hb_ot_layout_language_find_feature
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
script_index
,
unsigned
int
language_index
,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
);
unsigned
int
hb_ot_layout_feature_get_lookup_count
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
);
unsigned
int
hb_ot_layout_feature_get_lookup_index
(
hb_ot_layout_t
*
layout
,
hb_ot_layout_table_type_t
table_type
,
unsigned
int
feature_index
,
unsigned
int
num_lookup
);
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录