Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
89a2bc9b
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看板
提交
89a2bc9b
编写于
5月 31, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Vertical] Apply vertical features
We apply all of vert, vrt2, vkrn, valt, and vpal.
上级
0c6a9767
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
41 addition
and
16 deletion
+41
-16
TODO
TODO
+0
-7
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+41
-9
未找到文件。
TODO
浏览文件 @
89a2bc9b
...
...
@@ -11,13 +11,6 @@ General fixes:
- Do proper rounding when scaling from font space?
- Adjust default features for vertical text:
* vrt2 preferred over vert; but if user selects vert, turn vrt2 off?
* vkrn (enables vpal? vpal anyone???);
* valt: "This feature is mutually exclusive with all other glyph-height features (e.g. vhal and vpal),
which should be turned off when it's applied. It deactivates the kern."
API issues to fix before 1.0:
============================
...
...
src/hb-ot-shape.cc
浏览文件 @
89a2bc9b
...
...
@@ -34,18 +34,36 @@
HB_BEGIN_DECLS
/* XXX vertical */
hb_tag_t
default_features
[]
=
{
HB_TAG
(
'c'
,
'a'
,
'l'
,
't'
),
hb_tag_t
early_features
[]
=
{
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
),
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
),
};
hb_tag_t
common_features
[]
=
{
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
),
HB_TAG
(
'm'
,
'k'
,
'm'
,
'k'
),
HB_TAG
(
'r'
,
'l'
,
'i'
,
'g'
),
};
hb_tag_t
horizontal_features
[]
=
{
HB_TAG
(
'c'
,
'a'
,
'l'
,
't'
),
HB_TAG
(
'c'
,
'l'
,
'i'
,
'g'
),
HB_TAG
(
'c'
,
'u'
,
'r'
,
's'
),
HB_TAG
(
'k'
,
'e'
,
'r'
,
'n'
),
HB_TAG
(
'l'
,
'i'
,
'g'
,
'a'
),
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
),
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
),
HB_TAG
(
'm'
,
'k'
,
'm'
,
'k'
),
HB_TAG
(
'r'
,
'l'
,
'i'
,
'g'
)
};
/* Note:
* Technically speaking, vrt2 and vert are mutually exclusive.
* According to the spec, valt and vpal are also mutually exclusive.
* But we apply them all for now.
*/
hb_tag_t
vertical_features
[]
=
{
HB_TAG
(
'v'
,
'a'
,
'l'
,
't'
),
HB_TAG
(
'v'
,
'e'
,
'r'
,
't'
),
HB_TAG
(
'v'
,
'k'
,
'r'
,
'n'
),
HB_TAG
(
'v'
,
'p'
,
'a'
,
'l'
),
HB_TAG
(
'v'
,
'r'
,
't'
,
'2'
),
};
static
void
...
...
@@ -70,11 +88,25 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
break
;
}
for
(
unsigned
int
i
=
0
;
i
<
ARRAY_LENGTH
(
default_features
);
i
++
)
planner
->
map
.
add_bool_feature
(
default_features
[
i
]);
#define ADD_FEATURES(array) \
HB_STMT_START { \
for (unsigned int i = 0; i < ARRAY_LENGTH (array); i++) \
planner->map.add_bool_feature (array[i]); \
} HB_STMT_END
ADD_FEATURES
(
early_features
);
hb_ot_shape_complex_collect_features
(
planner
,
props
);
ADD_FEATURES
(
common_features
);
if
(
HB_DIRECTION_IS_HORIZONTAL
(
props
->
direction
))
ADD_FEATURES
(
horizontal_features
);
else
ADD_FEATURES
(
vertical_features
);
#undef ADD_FEATURES
for
(
unsigned
int
i
=
0
;
i
<
num_user_features
;
i
++
)
{
const
hb_feature_t
*
feature
=
&
user_features
[
i
];
planner
->
map
.
add_feature
(
feature
->
tag
,
feature
->
value
,
(
feature
->
start
==
0
&&
feature
->
end
==
(
unsigned
int
)
-
1
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录