Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
54f4c17f
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看板
提交
54f4c17f
编写于
11月 23, 2018
作者:
E
Ebrahim Byagowi
提交者:
Behdad Esfahbod
11月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[feat] Rename API uses of setting to selector
上级
9c64b216
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
111 addition
and
111 deletion
+111
-111
docs/harfbuzz-sections.txt
docs/harfbuzz-sections.txt
+3
-3
src/hb-aat-layout-feat-table.hh
src/hb-aat-layout-feat-table.hh
+26
-26
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+1
-1
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+44
-44
src/hb-aat-layout.hh
src/hb-aat-layout.hh
+2
-2
src/hb-aat-map.cc
src/hb-aat-map.cc
+1
-1
src/hb-aat-map.hh
src/hb-aat-map.hh
+1
-1
src/hb-aat.h
src/hb-aat.h
+10
-10
test/api/test-aat-layout.c
test/api/test-aat-layout.c
+23
-23
未找到文件。
docs/harfbuzz-sections.txt
浏览文件 @
54f4c17f
...
...
@@ -6,9 +6,9 @@ HB_OT_H_IN
<SECTION>
<FILE>hb-aat</FILE>
hb_aat_layout_feature_get_name_id
hb_aat_layout_feature_get_se
tting
s
hb_aat_layout_feature_se
tting
_get_name_id
hb_aat_layout_feature_se
tting
_t
hb_aat_layout_feature_get_se
lector
s
hb_aat_layout_feature_se
lector
_get_name_id
hb_aat_layout_feature_se
lector
_t
hb_aat_layout_feature_type_t
hb_aat_layout_get_features
</SECTION>
...
...
src/hb-aat-layout-feat-table.hh
浏览文件 @
54f4c17f
...
...
@@ -41,15 +41,15 @@ struct SettingName
{
static
int
cmp
(
const
void
*
key_
,
const
void
*
entry_
)
{
hb_aat_layout_feature_se
tting_t
key
=
*
(
hb_aat_layout_feature_setting
_t
*
)
key_
;
hb_aat_layout_feature_se
lector_t
key
=
*
(
hb_aat_layout_feature_selector
_t
*
)
key_
;
const
SettingName
*
entry
=
(
const
SettingName
*
)
entry_
;
return
key
<
entry
->
setting
?
-
1
:
key
>
entry
->
setting
?
+
1
:
0
;
}
inline
hb_aat_layout_feature_se
tting_t
get_setting
()
const
{
return
(
hb_aat_layout_feature_se
tting
_t
)
(
unsigned
int
)
setting
;
}
inline
hb_aat_layout_feature_se
lector_t
get_selector
()
const
{
return
(
hb_aat_layout_feature_se
lector
_t
)
(
unsigned
int
)
setting
;
}
inline
hb_ot_name_id_t
get_name_id
()
const
{
return
nameIndex
;
}
...
...
@@ -72,7 +72,7 @@ struct FeatureName
{
static
int
cmp
(
const
void
*
key_
,
const
void
*
entry_
)
{
hb_aat_layout_feature_se
tting_t
key
=
*
(
hb_aat_layout_feature_setting
_t
*
)
key_
;
hb_aat_layout_feature_se
lector_t
key
=
*
(
hb_aat_layout_feature_selector
_t
*
)
key_
;
const
FeatureName
*
entry
=
(
const
FeatureName
*
)
entry_
;
return
key
<
entry
->
feature
?
-
1
:
key
>
entry
->
feature
?
+
1
:
...
...
@@ -93,11 +93,11 @@ struct FeatureName
* as the default. */
};
inline
unsigned
int
get_se
ttings
(
const
feat
*
feat
,
hb_aat_layout_feature_setting_t
*
default_setting
,
unsigned
int
start_offset
,
unsigned
int
*
count
,
hb_aat_layout_feature_setting_t
*
setting
s
)
const
inline
unsigned
int
get_se
lectors
(
const
feat
*
feat
,
hb_aat_layout_feature_selector_t
*
default_selector
,
unsigned
int
start_offset
,
unsigned
int
*
count
,
hb_aat_layout_feature_selector_t
*
selector
s
)
const
{
const
UnsizedArrayOf
<
SettingName
>&
settings_table
=
feat
+
settingTableZ
;
unsigned
int
settings_count
=
nSettings
;
...
...
@@ -105,15 +105,15 @@ struct FeatureName
{
unsigned
int
len
=
MIN
(
settings_count
-
start_offset
,
*
count
);
for
(
unsigned
int
i
=
0
;
i
<
len
;
i
++
)
se
ttings
[
i
]
=
settings_table
[
start_offset
+
i
].
get_setting
();
se
lectors
[
i
]
=
settings_table
[
start_offset
+
i
].
get_selector
();
*
count
=
len
;
}
if
(
default_se
tting
)
if
(
default_se
lector
)
{
unsigned
int
index
=
(
featureFlags
&
NotDefault
)
?
featureFlags
&
IndexMask
:
0
;
*
default_se
tting
=
((
featureFlags
&
Exclusive
)
&&
index
<
settings_count
)
?
settings_table
[
index
].
get_setting
()
:
HB_AAT_LAYOUT_SELECTOR_INVALID
;
*
default_se
lector
=
((
featureFlags
&
Exclusive
)
&&
index
<
settings_count
)
?
settings_table
[
index
].
get_selector
()
:
HB_AAT_LAYOUT_SELECTOR_INVALID
;
}
return
settings_count
;
}
...
...
@@ -123,8 +123,8 @@ struct FeatureName
inline
hb_ot_name_id_t
get_feature_name_id
()
const
{
return
nameIndex
;
}
inline
hb_ot_name_id_t
get_feature_se
tting
_name_id
(
const
feat
*
feat
,
hb_aat_layout_feature_setting
_t
key
)
const
inline
hb_ot_name_id_t
get_feature_se
lector
_name_id
(
const
feat
*
feat
,
hb_aat_layout_feature_selector
_t
key
)
const
{
const
SettingName
*
setting
=
(
SettingName
*
)
hb_bsearch
(
&
key
,
feat
+
settingTableZ
,
nSettings
,
...
...
@@ -189,18 +189,18 @@ struct feat
inline
hb_ot_name_id_t
get_feature_name_id
(
hb_aat_layout_feature_type_t
feature
)
const
{
return
get_feature
(
feature
).
get_feature_name_id
();
}
inline
hb_ot_name_id_t
get_feature_se
tting
_name_id
(
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_se
tting_t
setting
)
const
{
return
get_feature
(
feature
).
get_feature_se
tting_name_id
(
this
,
setting
);
}
inline
hb_ot_name_id_t
get_feature_se
lector
_name_id
(
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_se
lector_t
selector
)
const
{
return
get_feature
(
feature
).
get_feature_se
lector_name_id
(
this
,
selector
);
}
inline
unsigned
int
get_se
tting
s
(
hb_aat_layout_feature_type_t
key
,
hb_aat_layout_feature_se
tting_t
*
default_setting
,
unsigned
int
start_offset
,
unsigned
int
*
count
,
hb_aat_layout_feature_se
tting_t
*
setting
s
)
const
inline
unsigned
int
get_se
lector
s
(
hb_aat_layout_feature_type_t
key
,
hb_aat_layout_feature_se
lector_t
*
default_selector
,
unsigned
int
start_offset
,
unsigned
int
*
count
,
hb_aat_layout_feature_se
lector_t
*
selector
s
)
const
{
return
get_feature
(
key
).
get_se
ttings
(
this
,
default_setting
,
start_offset
,
count
,
setting
s
);
return
get_feature
(
key
).
get_se
lectors
(
this
,
default_selector
,
start_offset
,
count
,
selector
s
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
src/hb-aat-layout-morx-table.hh
浏览文件 @
54f4c17f
...
...
@@ -959,7 +959,7 @@ struct Chain
{
const
Feature
&
feature
=
featureZ
[
i
];
hb_aat_layout_feature_type_t
type
=
(
hb_aat_layout_feature_type_t
)
(
unsigned
int
)
feature
.
featureType
;
hb_aat_layout_feature_se
tting_t
setting
=
(
hb_aat_layout_feature_setting
_t
)
(
unsigned
int
)
feature
.
featureSetting
;
hb_aat_layout_feature_se
lector_t
setting
=
(
hb_aat_layout_feature_selector
_t
)
(
unsigned
int
)
feature
.
featureSetting
;
retry:
const
hb_aat_map_builder_t
::
feature_info_t
*
info
=
map
->
features
.
bsearch
((
uint16_t
)
type
);
if
(
info
&&
info
->
setting
==
setting
)
...
...
src/hb-aat-layout.cc
浏览文件 @
54f4c17f
...
...
@@ -53,37 +53,37 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{
HB_TAG
(
'c'
,
'p'
,
's'
,
'p'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT
,
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_ON
,
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_OFF
},
{
HB_TAG
(
'c'
,
's'
,
'w'
,
'h'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES
,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON
,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF
},
{
HB_TAG
(
'd'
,
'l'
,
'i'
,
'g'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES
,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_ON
,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_OFF
},
{
HB_TAG
(
'e'
,
'x'
,
'p'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'e'
,
'x'
,
'p'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'f'
,
'r'
,
'a'
,
'c'
),
HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS
,
HB_AAT_LAYOUT_SELECTOR_DIAGONAL_FRACTIONS
,
HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS
},
{
HB_TAG
(
'f'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'h'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'f'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'h'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'h'
,
'i'
,
's'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES
,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON
,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF
},
{
HB_TAG
(
'h'
,
'k'
,
'n'
,
'a'
),
HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA
,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON
,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_OFF
},
{
HB_TAG
(
'h'
,
'l'
,
'i'
,
'g'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES
,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON
,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF
},
{
HB_TAG
(
'h'
,
'n'
,
'g'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION
,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL
,
HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION
},
{
HB_TAG
(
'h'
,
'o'
,
'j'
,
'o'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'h'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'h'
,
'o'
,
'j'
,
'o'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'h'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'i'
,
't'
,
'a'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN
,
HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON
,
HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF
},
{
HB_TAG
(
'j'
,
'p'
,
'0'
,
'4'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'7'
,
'8'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'8'
,
'3'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'9'
,
'0'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'0'
,
'4'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'7'
,
'8'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'8'
,
'3'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'j'
,
'p'
,
'9'
,
'0'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'l'
,
'i'
,
'g'
,
'a'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES
,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_ON
,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_OFF
},
{
HB_TAG
(
'l'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE
,
HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS
,
(
hb_aat_layout_feature_se
tting
_t
)
2
},
{
HB_TAG
(
'l'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE
,
HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS
,
(
hb_aat_layout_feature_se
lector
_t
)
2
},
{
HB_TAG
(
'm'
,
'g'
,
'r'
,
'k'
),
HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS
,
HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON
,
HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF
},
{
HB_TAG
(
'n'
,
'l'
,
'c'
,
'k'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
'o'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE
,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS
,
(
hb_aat_layout_feature_se
tting
_t
)
2
},
{
HB_TAG
(
'n'
,
'l'
,
'c'
,
'k'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
'o'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE
,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS
,
(
hb_aat_layout_feature_se
lector
_t
)
2
},
{
HB_TAG
(
'o'
,
'r'
,
'd'
,
'n'
),
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION
,
HB_AAT_LAYOUT_SELECTOR_ORDINALS
,
HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION
},
{
HB_TAG
(
'p'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'p'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'p'
,
'c'
,
'a'
,
'p'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE
,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS
,
HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE
},
{
HB_TAG
(
'p'
,
'k'
,
'n'
,
'a'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'p'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS
,
(
hb_aat_layout_feature_se
tting
_t
)
4
},
{
HB_TAG
(
'p'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'q'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'p'
,
'k'
,
'n'
,
'a'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'p'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS
,
(
hb_aat_layout_feature_se
lector
_t
)
4
},
{
HB_TAG
(
'p'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'q'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'r'
,
'u'
,
'b'
,
'y'
),
HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA
,
HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON
,
HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF
},
{
HB_TAG
(
's'
,
'i'
,
'n'
,
'f'
),
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION
,
HB_AAT_LAYOUT_SELECTOR_SCIENTIFIC_INFERIORS
,
HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION
},
{
HB_TAG
(
's'
,
'm'
,
'c'
,
'p'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE
,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS
,
HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE
},
{
HB_TAG
(
's'
,
'm'
,
'p'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
's'
,
'm'
,
'p'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
's'
,
's'
,
'0'
,
'1'
),
HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF
},
{
HB_TAG
(
's'
,
's'
,
'0'
,
'2'
),
HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_ON
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_OFF
},
{
HB_TAG
(
's'
,
's'
,
'0'
,
'3'
),
HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_ON
,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_OFF
},
...
...
@@ -108,16 +108,16 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{
HB_TAG
(
's'
,
'u'
,
'p'
,
's'
),
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION
,
HB_AAT_LAYOUT_SELECTOR_SUPERIORS
,
HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION
},
{
HB_TAG
(
's'
,
'w'
,
's'
,
'h'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES
,
HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON
,
HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF
},
{
HB_TAG
(
't'
,
'i'
,
't'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS
,
HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS
,
HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS
},
{
HB_TAG
(
't'
,
'n'
,
'a'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
't'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS
,
(
hb_aat_layout_feature_se
tting
_t
)
4
},
{
HB_TAG
(
't'
,
'r'
,
'a'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS
,
(
hb_aat_layout_feature_se
tting
_t
)
16
},
{
HB_TAG
(
't'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'u'
,
'n'
,
'i'
,
'c'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE
,
(
hb_aat_layout_feature_se
tting_t
)
14
,
(
hb_aat_layout_feature_setting
_t
)
15
},
{
HB_TAG
(
'v'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
't'
,
'n'
,
'a'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
't'
,
'n'
,
'u'
,
'm'
),
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS
,
(
hb_aat_layout_feature_se
lector
_t
)
4
},
{
HB_TAG
(
't'
,
'r'
,
'a'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
,
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS
,
(
hb_aat_layout_feature_se
lector
_t
)
16
},
{
HB_TAG
(
't'
,
'w'
,
'i'
,
'd'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'u'
,
'n'
,
'i'
,
'c'
),
HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE
,
(
hb_aat_layout_feature_se
lector_t
)
14
,
(
hb_aat_layout_feature_selector
_t
)
15
},
{
HB_TAG
(
'v'
,
'a'
,
'l'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'v'
,
'e'
,
'r'
,
't'
),
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION
,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON
,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF
},
{
HB_TAG
(
'v'
,
'h'
,
'a'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'v'
,
'h'
,
'a'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'v'
,
'k'
,
'n'
,
'a'
),
HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA
,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_ON
,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_OFF
},
{
HB_TAG
(
'v'
,
'p'
,
'a'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
tting
_t
)
7
},
{
HB_TAG
(
'v'
,
'p'
,
'a'
,
'l'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT
,
(
hb_aat_layout_feature_se
lector
_t
)
7
},
{
HB_TAG
(
'v'
,
'r'
,
't'
,
'2'
),
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION
,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON
,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF
},
{
HB_TAG
(
'z'
,
'e'
,
'r'
,
'o'
),
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_ON
,
HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_OFF
},
};
...
...
@@ -335,10 +335,10 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
{
return
face
->
table
.
feat
->
get_feature_name_id
(
feature
);
}
/**
* hb_aat_layout_feature_get_se
tting
s:
* hb_aat_layout_feature_get_se
lector
s:
* @face: a face object
* @feature: feature id
* @default_se
tting
: (out): if is set, the feature is exclusive
* @default_se
lector
: (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
...
...
@@ -357,29 +357,29 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
* Since: REPLACEME
*/
unsigned
int
hb_aat_layout_feature_get_se
tting
s
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_se
tting_t
*
default_setting
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
*
count
,
/* IN/OUT. May be NULL. */
hb_aat_layout_feature_se
tting_t
*
setting
s
/* OUT. May be NULL. */
)
hb_aat_layout_feature_get_se
lector
s
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_se
lector_t
*
default_selector
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
*
count
,
/* IN/OUT. May be NULL. */
hb_aat_layout_feature_se
lector_t
*
selector
s
/* OUT. May be NULL. */
)
{
return
face
->
table
.
feat
->
get_se
ttings
(
feature
,
default_setting
,
start_offset
,
count
,
setting
s
);
return
face
->
table
.
feat
->
get_se
lectors
(
feature
,
default_selector
,
start_offset
,
count
,
selector
s
);
}
/**
* hb_aat_layout_feature_se
tting
_get_name_id:
* @face: a face object
* @feature: feature id
* @se
tting: setting
value
* hb_aat_layout_feature_se
lector
_get_name_id:
* @face:
a face object
* @feature:
feature id
* @se
lector: selector
value
*
* Return value: Name ID index
*
* Since: REPLACEME
*/
hb_ot_name_id_t
hb_aat_layout_feature_se
tting_get_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
setting
)
{
return
face
->
table
.
feat
->
get_feature_se
tting_name_id
(
feature
,
setting
);
}
hb_aat_layout_feature_se
lector_get_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_selector_t
selector
)
{
return
face
->
table
.
feat
->
get_feature_se
lector_name_id
(
feature
,
selector
);
}
src/hb-aat-layout.hh
浏览文件 @
54f4c17f
...
...
@@ -37,8 +37,8 @@ struct hb_aat_feature_mapping_t
{
hb_tag_t
otFeatureTag
;
hb_aat_layout_feature_type_t
aatFeatureType
;
hb_aat_layout_feature_se
tting
_t
selectorToEnable
;
hb_aat_layout_feature_se
tting
_t
selectorToDisable
;
hb_aat_layout_feature_se
lector
_t
selectorToEnable
;
hb_aat_layout_feature_se
lector
_t
selectorToDisable
;
static
inline
int
cmp
(
const
void
*
key_
,
const
void
*
entry_
)
{
...
...
src/hb-aat-map.cc
浏览文件 @
54f4c17f
...
...
@@ -38,7 +38,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag,
{
feature_info_t
*
info
=
features
.
push
();
info
->
type
=
HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES
;
info
->
setting
=
(
hb_aat_layout_feature_se
tting
_t
)
value
;
info
->
setting
=
(
hb_aat_layout_feature_se
lector
_t
)
value
;
return
;
}
...
...
src/hb-aat-map.hh
浏览文件 @
54f4c17f
...
...
@@ -67,7 +67,7 @@ struct hb_aat_map_builder_t
struct
feature_info_t
{
hb_aat_layout_feature_type_t
type
;
hb_aat_layout_feature_se
tting
_t
setting
;
hb_aat_layout_feature_se
lector
_t
setting
;
unsigned
seq
;
/* For stable sorting only. */
static
int
cmp
(
const
void
*
pa
,
const
void
*
pb
)
...
...
src/hb-aat.h
浏览文件 @
54f4c17f
...
...
@@ -414,7 +414,7 @@ typedef enum
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_CJK_ROMAN
=
1
,
HB_AAT_LAYOUT_SELECTOR_DEFAULT_CJK_ROMAN
=
2
,
HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_CJK_ROMAN
=
3
}
hb_aat_layout_feature_se
tting
_t
;
}
hb_aat_layout_feature_se
lector
_t
;
HB_EXTERN
unsigned
int
hb_aat_layout_get_features
(
hb_face_t
*
face
,
...
...
@@ -428,17 +428,17 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
HB_EXTERN
unsigned
int
hb_aat_layout_feature_get_se
tting
s
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
*
default_setting
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
*
count
,
/* IN/OUT. May be NULL. */
hb_aat_layout_feature_setting_t
*
settings
/* OUT. May be NULL. */
);
hb_aat_layout_feature_get_se
lector
s
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_selector_t
*
default_selector
,
/* OUT. May be NULL. */
unsigned
int
start_offset
,
unsigned
int
*
count
,
/* IN/OUT. May be NULL. */
hb_aat_layout_feature_selector_t
*
settings
/* OUT. May be NULL. */
);
HB_EXTERN
hb_ot_name_id_t
hb_aat_layout_feature_se
tting
_get_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_setting_t
setting
);
hb_aat_layout_feature_se
lector
_get_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature
,
hb_aat_layout_feature_selector_t
selector
);
HB_END_DECLS
...
...
test/api/test-aat-layout.c
浏览文件 @
54f4c17f
...
...
@@ -50,53 +50,53 @@ test_aat_get_features (void)
}
static
void
test_aat_get_feature_se
tting
s
(
void
)
test_aat_get_feature_se
lector
s
(
void
)
{
hb_aat_layout_feature_se
tting_t
default_setting
;
hb_aat_layout_feature_se
tting
_t
settings
[
3
];
hb_aat_layout_feature_se
lector_t
default_selector
;
hb_aat_layout_feature_se
lector
_t
settings
[
3
];
unsigned
int
count
=
3
;
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_feature_get_se
tting
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_setting
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_feature_get_se
lector
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_selector
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
3
,
==
,
count
);
g_assert_cmpuint
(
0
,
==
,
default_se
tting
);
g_assert_cmpuint
(
0
,
==
,
default_se
lector
);
g_assert_cmpuint
(
0
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
294
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
294
,
==
,
hb_aat_layout_feature_se
lector
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
1
,
==
,
settings
[
1
]);
g_assert_cmpuint
(
295
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
1
]));
g_assert_cmpuint
(
295
,
==
,
hb_aat_layout_feature_se
lector
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
1
]));
g_assert_cmpuint
(
2
,
==
,
settings
[
2
]);
g_assert_cmpuint
(
296
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
2
]));
g_assert_cmpuint
(
296
,
==
,
hb_aat_layout_feature_se
lector
_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_feature_se
tting
_get_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_se
lector
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
HB_AAT_LAYOUT_SELECTOR_INVALID
));
count
=
3
;
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_feature_get_se
tting
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_setting
,
3
,
&
count
,
settings
));
g_assert_cmpuint
(
4
,
==
,
hb_aat_layout_feature_get_se
lector
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
&
default_selector
,
3
,
&
count
,
settings
));
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
0
,
==
,
default_se
tting
);
g_assert_cmpuint
(
0
,
==
,
default_se
lector
);
g_assert_cmpuint
(
3
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
297
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
g_assert_cmpuint
(
297
,
==
,
hb_aat_layout_feature_se
lector
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
,
settings
[
0
]));
count
=
1
;
g_assert_cmpuint
(
1
,
==
,
hb_aat_layout_feature_get_se
tting
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
&
default_setting
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
1
,
==
,
hb_aat_layout_feature_get_se
lector
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
&
default_selector
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
1
,
==
,
count
);
g_assert_cmpuint
(
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
==
,
default_se
tting
);
g_assert_cmpuint
(
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
==
,
default_se
lector
);
g_assert_cmpuint
(
8
,
==
,
settings
[
0
]);
g_assert_cmpuint
(
308
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
settings
[
0
]));
g_assert_cmpuint
(
308
,
==
,
hb_aat_layout_feature_se
lector
_get_name_id
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
,
settings
[
0
]));
count
=
100
;
g_assert_cmpuint
(
0
,
==
,
hb_aat_layout_feature_get_se
tting
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
NULL
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
0
,
==
,
hb_aat_layout_feature_get_se
lector
s
(
face
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
NULL
,
0
,
&
count
,
settings
));
g_assert_cmpuint
(
0
,
==
,
count
);
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_feature_se
tting
_get_name_id
(
sbix
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
(
hb_aat_layout_feature_setting
_t
)
0
));
g_assert_cmpuint
(
HB_OT_NAME_ID_INVALID
,
==
,
hb_aat_layout_feature_se
lector
_get_name_id
(
sbix
,
HB_AAT_LAYOUT_FEATURE_TYPE_INVALID
,
(
hb_aat_layout_feature_selector
_t
)
0
));
}
int
...
...
@@ -105,7 +105,7 @@ main (int argc, char **argv)
hb_test_init
(
&
argc
,
&
argv
);
hb_test_add
(
test_aat_get_features
);
hb_test_add
(
test_aat_get_feature_se
tting
s
);
hb_test_add
(
test_aat_get_feature_se
lector
s
);
face
=
hb_test_open_font_file
(
"fonts/aat-feat.ttf"
);
sbix
=
hb_test_open_font_file
(
"fonts/chromacheck-sbix.ttf"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录