Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9c64b216
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看板
提交
9c64b216
编写于
11月 23, 2018
作者:
E
Ebrahim Byagowi
提交者:
Behdad Esfahbod
11月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[feat] Apply renamings and add documentation
上级
a8726cb4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
65 addition
and
23 deletion
+65
-23
docs/harfbuzz-sections.txt
docs/harfbuzz-sections.txt
+10
-0
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+38
-6
src/hb-aat.h
src/hb-aat.h
+3
-3
test/api/test-aat-layout.c
test/api/test-aat-layout.c
+14
-14
未找到文件。
docs/harfbuzz-sections.txt
浏览文件 @
9c64b216
...
@@ -3,6 +3,16 @@ HB_H_IN
...
@@ -3,6 +3,16 @@ HB_H_IN
HB_OT_H_IN
HB_OT_H_IN
</SECTION>
</SECTION>
<SECTION>
<FILE>hb-aat</FILE>
hb_aat_layout_feature_get_name_id
hb_aat_layout_feature_get_settings
hb_aat_layout_feature_setting_get_name_id
hb_aat_layout_feature_setting_t
hb_aat_layout_feature_type_t
hb_aat_layout_get_features
</SECTION>
<SECTION>
<SECTION>
<FILE>hb-blob</FILE>
<FILE>hb-blob</FILE>
hb_blob_create
hb_blob_create
...
...
src/hb-aat-layout.cc
浏览文件 @
9c64b216
...
@@ -302,6 +302,12 @@ _hb_aat_language_get (hb_face_t *face,
...
@@ -302,6 +302,12 @@ _hb_aat_language_get (hb_face_t *face,
/**
/**
* hb_aat_layout_get_features:
* hb_aat_layout_get_features:
* @face: a face object
* @start_offset: iteration's start offset
* @count: (inout): buffer size as input, filled size as output
* @features: (out): features buffer
*
* Return value: Number of all available features
*
*
* Since: REPLACEME
* Since: REPLACEME
*/
*/
...
@@ -315,22 +321,43 @@ hb_aat_layout_get_features (hb_face_t *face,
...
@@ -315,22 +321,43 @@ hb_aat_layout_get_features (hb_face_t *face,
}
}
/**
/**
* hb_aat_layout_get_feature_name_id:
* hb_aat_layout_feature_get_name_id:
* @face: a face object
* @feature: feature id
*
* Return value: Name ID index
*
*
* Since: REPLACEME
* Since: REPLACEME
*/
*/
hb_ot_name_id_t
hb_ot_name_id_t
hb_aat_layout_
get_feature
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_
feature_get
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
)
hb_aat_layout_feature_type_t
feature
)
{
return
face
->
table
.
feat
->
get_feature_name_id
(
feature
);
}
{
return
face
->
table
.
feat
->
get_feature_name_id
(
feature
);
}
/**
/**
* hb_aat_layout_get_feature_settings:
* hb_aat_layout_feature_get_settings:
* @face: a face object
* @feature: feature id
* @default_setting: (out): if is set, the feature is exclusive
* @start_offset: iteration's start offset
* @count: (inout): buffer size as input, filled size as output
* @settings: (out): settings buffer
*
* Per spec:
* For feature types that don't have exclusive settings,
* there will always be a pair of values. One value turns
* a selector on and a second value turns the selector off.
* The on setting must be even and the off setting must be one
* greater than the corresponding on setting. The off setting
* is therefore always odd. As a result, only the on setting
* should have an entry in the setting name array.
*
* Return value: Number of all available features
*
*
* Since: REPLACEME
* Since: REPLACEME
*/
*/
unsigned
int
unsigned
int
hb_aat_layout_
get_feature
_settings
(
hb_face_t
*
face
,
hb_aat_layout_
feature_get
_settings
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
*
default_setting
,
/* OUT. May be NULL. */
hb_aat_layout_feature_setting_t
*
default_setting
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
start_offset
,
...
@@ -342,12 +369,17 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
...
@@ -342,12 +369,17 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
}
}
/**
/**
* hb_aat_layout_get_feature_setting_name_id:
* hb_aat_layout_feature_setting_get_name_id:
* @face: a face object
* @feature: feature id
* @setting: setting value
*
* Return value: Name ID index
*
*
* Since: REPLACEME
* Since: REPLACEME
*/
*/
hb_ot_name_id_t
hb_ot_name_id_t
hb_aat_layout_
get_feature_setting
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_
feature_setting_get
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
setting
)
hb_aat_layout_feature_setting_t
setting
)
{
return
face
->
table
.
feat
->
get_feature_setting_name_id
(
feature
,
setting
);
}
{
return
face
->
table
.
feat
->
get_feature_setting_name_id
(
feature
,
setting
);
}
src/hb-aat.h
浏览文件 @
9c64b216
...
@@ -423,12 +423,12 @@ hb_aat_layout_get_features (hb_face_t *face,
...
@@ -423,12 +423,12 @@ hb_aat_layout_get_features (hb_face_t *face,
hb_aat_layout_feature_type_t
*
features
/* OUT. May be NULL. */
);
hb_aat_layout_feature_type_t
*
features
/* OUT. May be NULL. */
);
HB_EXTERN
hb_ot_name_id_t
HB_EXTERN
hb_ot_name_id_t
hb_aat_layout_
get_feature
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_
feature_get
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
);
hb_aat_layout_feature_type_t
feature
);
HB_EXTERN
unsigned
int
HB_EXTERN
unsigned
int
hb_aat_layout_
get_feature
_settings
(
hb_face_t
*
face
,
hb_aat_layout_
feature_get
_settings
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
*
default_setting
,
/* OUT. May be NULL. */
hb_aat_layout_feature_setting_t
*
default_setting
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
start_offset
,
...
@@ -436,7 +436,7 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
...
@@ -436,7 +436,7 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
hb_aat_layout_feature_setting_t
*
settings
/* OUT. May be NULL. */
);
hb_aat_layout_feature_setting_t
*
settings
/* OUT. May be NULL. */
);
HB_EXTERN
hb_ot_name_id_t
HB_EXTERN
hb_ot_name_id_t
hb_aat_layout_
get_feature_setting
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_
feature_setting_get
_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
setting
);
hb_aat_layout_feature_setting_t
setting
);
...
...
test/api/test-aat-layout.c
浏览文件 @
9c64b216
...
@@ -44,9 +44,9 @@ test_aat_get_features (void)
...
@@ -44,9 +44,9 @@ test_aat_get_features (void)
g_assert_cmpuint
(
3
,
==
,
features
[
1
]);
g_assert_cmpuint
(
3
,
==
,
features
[
1
]);
g_assert_cmpuint
(
6
,
==
,
features
[
2
]);
g_assert_cmpuint
(
6
,
==
,
features
[
2
]);
g_assert_cmpuint
(
258
,
==
,
hb_aat_layout_
get_feature
_name_id
(
face
,
features
[
0
]));
g_assert_cmpuint
(
258
,
==
,
hb_aat_layout_
feature_get
_name_id
(
face
,
features
[
0
]));
g_assert_cmpuint
(
261
,
==
,
hb_aat_layout_
get_feature
_name_id
(
face
,
features
[
1
]));
g_assert_cmpuint
(
261
,
==
,
hb_aat_layout_
feature_get
_name_id
(
face
,
features
[
1
]));
g_assert_cmpuint
(
265
,
==
,
hb_aat_layout_
get_feature
_name_id
(
face
,
features
[
2
]));
g_assert_cmpuint
(
265
,
==
,
hb_aat_layout_
feature_get
_name_id
(
face
,
features
[
2
]));
}
}
static
void
static
void
...
@@ -56,46 +56,46 @@ test_aat_get_feature_settings (void)
...
@@ -56,46 +56,46 @@ test_aat_get_feature_settings (void)
hb_aat_layout_feature_setting_t
settings
[
3
];
hb_aat_layout_feature_setting_t
settings
[
3
];
unsigned
int
count
=
3
;
unsigned
int
count
=
3
;
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_
get_feature
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_
feature_get
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_setting
,
0
,
&
count
,
settings
));
&
default_setting
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
3
,
==
,
count
);
g_assert_cmpuint
(
3
,
==
,
count
);
g_assert_cmpuint
(
0
,
==
,
default_setting
);
g_assert_cmpuint
(
0
,
==
,
default_setting
);
g_assert_cmpuint
(
0
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
0
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
294
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
294
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
1
,
==
,
settings
[
1
]);
g_assert_cmpuint
(
1
,
==
,
settings
[
1
]);
g_assert_cmpuint
(
295
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
1
]));
g_assert_cmpuint
(
295
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
1
]));
g_assert_cmpuint
(
2
,
==
,
settings
[
2
]);
g_assert_cmpuint
(
2
,
==
,
settings
[
2
]);
g_assert_cmpuint
(
296
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
2
]));
g_assert_cmpuint
(
296
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
2
]));
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
HB_AAT_LAYOUT_SELECTOR_INVALID
));
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
HB_AAT_LAYOUT_SELECTOR_INVALID
));
count
=
3
;
count
=
3
;
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_
get_feature
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_
feature_get
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_setting
,
3
,
&
count
,
settings
));
&
default_setting
,
3
,
&
count
,
settings
));
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
0
,
==
,
default_setting
);
g_assert_cmpuint
(
0
,
==
,
default_setting
);
g_assert_cmpuint
(
3
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
3
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
297
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
297
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
count
=
1
;
count
=
1
;
g_assert_cmpuint
(
1
,
==
,
hb_aat_layout_
get_feature
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
g_assert_cmpuint
(
1
,
==
,
hb_aat_layout_
feature_get
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
&
default_setting
,
0
,
&
count
,
settings
));
&
default_setting
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
==
,
default_setting
);
g_assert_cmpuint
(
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
==
,
default_setting
);
g_assert_cmpuint
(
8
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
8
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
308
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
settings
[
0
]));
g_assert_cmpuint
(
308
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
settings
[
0
]));
count
=
100
;
count
=
100
;
g_assert_cmpuint
(
0
,
==
,
hb_aat_layout_
get_feature
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
g_assert_cmpuint
(
0
,
==
,
hb_aat_layout_
feature_get
_settings
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
NULL
,
0
,
&
count
,
settings
));
NULL
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
0
,
==
,
count
);
g_assert_cmpuint
(
0
,
==
,
count
);
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_
get_feature_setting
_name_id
(
sbix
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_
feature_setting_get
_name_id
(
sbix
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
(
hb_aat_layout_feature_setting_t
)
0
));
(
hb_aat_layout_feature_setting_t
)
0
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录