Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
38d5c58d
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,发现更多精彩内容 >>
提交
38d5c58d
编写于
8月 06, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[uniscribe] Half-support user features
Turning features on globally works now.
上级
639afdc6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
11 deletion
+43
-11
src/hb-uniscribe.cc
src/hb-uniscribe.cc
+43
-11
未找到文件。
src/hb-uniscribe.cc
浏览文件 @
38d5c58d
...
...
@@ -659,11 +659,27 @@ retry:
#undef MAX_ITEMS
int
*
range_char_counts
=
NULL
;
TEXTRANGE_PROPERTIES
**
range_properties
=
NULL
;
int
range_count
=
0
;
if
(
num_features
)
{
/* TODO setup ranges */
hb_auto_array_t
<
OPENTYPE_FEATURE_RECORD
>
feature_records
;
hb_auto_array_t
<
TEXTRANGE_PROPERTIES
>
range_records
;
hb_auto_array_t
<
TEXTRANGE_PROPERTIES
*>
range_properties
;
hb_auto_array_t
<
int
>
range_char_counts
;
if
(
num_features
)
{
for
(
unsigned
int
i
=
0
;
i
<
num_features
;
i
++
)
{
OPENTYPE_FEATURE_RECORD
*
record
=
feature_records
.
push
();
if
(
likely
(
record
))
{
record
->
tagFeature
=
hb_uint32_swap
(
features
[
i
].
tag
);
record
->
lParameter
=
features
[
i
].
value
;
}
}
TEXTRANGE_PROPERTIES
*
range_record
=
range_records
.
push
();
if
(
likely
(
range_record
))
{
range_record
->
potfRecords
=
feature_records
.
array
;
range_record
->
cotfRecords
=
feature_records
.
len
;
}
}
OPENTYPE_TAG
language_tag
=
hb_uint32_swap
(
hb_ot_tag_from_language
(
buffer
->
props
.
language
));
...
...
@@ -677,15 +693,31 @@ retry:
unsigned
int
chars_offset
=
items
[
i
].
iCharPos
;
unsigned
int
item_chars_len
=
items
[
i
+
1
].
iCharPos
-
chars_offset
;
if
(
num_features
)
{
/* XXX We currently ignore feature ranges and apply all features to all characters.
* Also, turning off a previously turned-on feature doesn't work. We have to do
* that part ourselves and pass the active features down to Uniscribe. */
range_char_counts
.
shrink
(
0
);
range_properties
.
shrink
(
0
);
range_char_counts
.
push
();
/* Can't fail. */
range_properties
.
push
();
/* Can't fail. */
range_char_counts
.
array
[
0
]
=
item_chars_len
;
range_properties
.
array
[
0
]
=
range_records
.
array
;
}
retry_shape:
hr
=
funcs
->
ScriptShapeOpenType
(
font_data
->
hdc
,
&
font_data
->
script_cache
,
&
items
[
i
].
a
,
script_tags
[
i
],
language_tag
,
range_char_counts
,
range_properties
,
range_
count
,
range_char_counts
.
array
,
range_properties
.
array
,
range_
properties
.
len
,
wchars
+
chars_offset
,
item_chars_len
,
glyphs_size
-
glyphs_offset
,
...
...
@@ -725,9 +757,9 @@ retry:
&
items
[
i
].
a
,
script_tags
[
i
],
language_tag
,
range_char_counts
,
range_properties
,
range_
count
,
range_char_counts
.
array
,
range_properties
.
array
,
range_
properties
.
len
,
wchars
+
chars_offset
,
log_clusters
+
chars_offset
,
char_props
+
chars_offset
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录