Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c47a31fb
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c47a31fb
编写于
7月 30, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[OT] Save chosen script tag
上级
3a9b14df
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
6 deletion
+20
-6
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+16
-4
src/hb-ot-layout.h
src/hb-ot-layout.h
+2
-1
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+1
-0
src/hb-ot-map.cc
src/hb-ot-map.cc
+1
-1
未找到文件。
src/hb-ot-layout.cc
浏览文件 @
c47a31fb
...
@@ -264,27 +264,39 @@ hb_bool_t
...
@@ -264,27 +264,39 @@ hb_bool_t
hb_ot_layout_table_choose_script
(
hb_face_t
*
face
,
hb_ot_layout_table_choose_script
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
script_tags
,
const
hb_tag_t
*
script_tags
,
unsigned
int
*
script_index
)
unsigned
int
*
script_index
,
hb_tag_t
*
chosen_script
)
{
{
ASSERT_STATIC
(
Index
::
NOT_FOUND_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
ASSERT_STATIC
(
Index
::
NOT_FOUND_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
face
,
table_tag
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
face
,
table_tag
);
while
(
*
script_tags
)
while
(
*
script_tags
)
{
{
if
(
g
.
find_script_index
(
*
script_tags
,
script_index
))
if
(
g
.
find_script_index
(
*
script_tags
,
script_index
))
{
if
(
chosen_script
)
*
chosen_script
=
*
script_tags
;
return
TRUE
;
return
TRUE
;
}
script_tags
++
;
script_tags
++
;
}
}
/* try finding 'DFLT' */
/* try finding 'DFLT' */
if
(
g
.
find_script_index
(
HB_OT_TAG_DEFAULT_SCRIPT
,
script_index
))
if
(
g
.
find_script_index
(
HB_OT_TAG_DEFAULT_SCRIPT
,
script_index
))
{
if
(
chosen_script
)
*
chosen_script
=
HB_OT_TAG_DEFAULT_SCRIPT
;
return
FALSE
;
return
FALSE
;
}
/* try with 'dflt'; MS site has had typos and many fonts use it now :( */
/* try with 'dflt'; MS site has had typos and many fonts use it now :( */
if
(
g
.
find_script_index
(
HB_OT_TAG_DEFAULT_LANGUAGE
,
script_index
))
if
(
g
.
find_script_index
(
HB_OT_TAG_DEFAULT_LANGUAGE
,
script_index
))
{
if
(
chosen_script
)
*
chosen_script
=
HB_OT_TAG_DEFAULT_LANGUAGE
;
return
FALSE
;
return
FALSE
;
}
if
(
script_index
)
*
script_index
=
HB_OT_LAYOUT_NO_SCRIPT_INDEX
;
if
(
script_index
)
*
script_index
=
HB_OT_LAYOUT_NO_SCRIPT_INDEX
;
if
(
chosen_script
)
*
chosen_script
=
HB_OT_LAYOUT_NO_SCRIPT_INDEX
;
return
FALSE
;
return
FALSE
;
}
}
...
...
src/hb-ot-layout.h
浏览文件 @
c47a31fb
...
@@ -92,7 +92,8 @@ hb_bool_t
...
@@ -92,7 +92,8 @@ hb_bool_t
hb_ot_layout_table_choose_script
(
hb_face_t
*
face
,
hb_ot_layout_table_choose_script
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
script_tags
,
const
hb_tag_t
*
script_tags
,
unsigned
int
*
script_index
);
unsigned
int
*
script_index
,
hb_tag_t
*
chosen_script
);
unsigned
int
unsigned
int
hb_ot_layout_table_get_feature_tags
(
hb_face_t
*
face
,
hb_ot_layout_table_get_feature_tags
(
hb_face_t
*
face
,
...
...
src/hb-ot-map-private.hh
浏览文件 @
c47a31fb
...
@@ -123,6 +123,7 @@ struct hb_ot_map_t
...
@@ -123,6 +123,7 @@ struct hb_ot_map_t
hb_mask_t
global_mask
;
hb_mask_t
global_mask
;
hb_tag_t
chosen_script
[
2
];
hb_prealloced_array_t
<
feature_map_t
,
8
>
features
;
hb_prealloced_array_t
<
feature_map_t
,
8
>
features
;
hb_prealloced_array_t
<
lookup_map_t
,
32
>
lookups
[
2
];
/* GSUB/GPOS */
hb_prealloced_array_t
<
lookup_map_t
,
32
>
lookups
[
2
];
/* GSUB/GPOS */
hb_prealloced_array_t
<
pause_map_t
,
1
>
pauses
[
2
];
/* GSUB/GPOS */
hb_prealloced_array_t
<
pause_map_t
,
1
>
pauses
[
2
];
/* GSUB/GPOS */
...
...
src/hb-ot-map.cc
浏览文件 @
c47a31fb
...
@@ -134,7 +134,7 @@ hb_ot_map_builder_t::compile (hb_face_t *face,
...
@@ -134,7 +134,7 @@ hb_ot_map_builder_t::compile (hb_face_t *face,
unsigned
int
script_index
[
2
],
language_index
[
2
];
unsigned
int
script_index
[
2
],
language_index
[
2
];
for
(
unsigned
int
table_index
=
0
;
table_index
<
2
;
table_index
++
)
{
for
(
unsigned
int
table_index
=
0
;
table_index
<
2
;
table_index
++
)
{
hb_tag_t
table_tag
=
table_tags
[
table_index
];
hb_tag_t
table_tag
=
table_tags
[
table_index
];
hb_ot_layout_table_choose_script
(
face
,
table_tag
,
script_tags
,
&
script_index
[
table_index
]);
hb_ot_layout_table_choose_script
(
face
,
table_tag
,
script_tags
,
&
script_index
[
table_index
]
,
&
m
.
chosen_script
[
table_index
]
);
hb_ot_layout_script_find_language
(
face
,
table_tag
,
script_index
[
table_index
],
language_tag
,
&
language_index
[
table_index
]);
hb_ot_layout_script_find_language
(
face
,
table_tag
,
script_index
[
table_index
],
language_tag
,
&
language_index
[
table_index
]);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录