Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3614ba24
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
3614ba24
编写于
8月 02, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Indic] Rename
上级
610e5e8f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
19 deletion
+21
-19
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+21
-19
未找到文件。
src/hb-ot-shape-complex-indic.cc
浏览文件 @
3614ba24
...
@@ -106,11 +106,11 @@ compare_codepoint (const void *pa, const void *pb)
...
@@ -106,11 +106,11 @@ compare_codepoint (const void *pa, const void *pb)
return
a
<
b
?
-
1
:
a
==
b
?
0
:
+
1
;
return
a
<
b
?
-
1
:
a
==
b
?
0
:
+
1
;
}
}
struct
consonant_position_closure
_t
struct
indic_shape_plan
_t
{
{
struct
feature_t
struct
would_apply_
feature_t
{
{
feature_t
(
const
hb_ot_map_t
*
map
,
hb_tag_t
feature_tag
)
would_apply_
feature_t
(
const
hb_ot_map_t
*
map
,
hb_tag_t
feature_tag
)
{
{
map
->
get_stage_lookups
(
0
/*GSUB*/
,
map
->
get_stage_lookups
(
0
/*GSUB*/
,
map
->
get_feature_stage
(
0
/*GSUB*/
,
feature_tag
),
map
->
get_feature_stage
(
0
/*GSUB*/
,
feature_tag
),
...
@@ -132,21 +132,23 @@ struct consonant_position_closure_t
...
@@ -132,21 +132,23 @@ struct consonant_position_closure_t
unsigned
int
count
;
unsigned
int
count
;
};
};
consonant_position_closure_t
(
const
hb_ot_map_t
*
map_
)
:
indic_shape_plan_t
(
const
hb_ot_map_t
*
map_
)
:
map
(
map_
),
map
(
map_
),
pref
(
map_
,
HB_TAG
(
'p'
,
'r'
,
'e'
,
'f'
)),
pref
(
map_
,
HB_TAG
(
'p'
,
'r'
,
'e'
,
'f'
)),
blwf
(
map_
,
HB_TAG
(
'b'
,
'l'
,
'w'
,
'f'
)),
blwf
(
map_
,
HB_TAG
(
'b'
,
'l'
,
'w'
,
'f'
)),
pstf
(
map_
,
HB_TAG
(
'p'
,
's'
,
't'
,
'f'
))
{}
pstf
(
map_
,
HB_TAG
(
'p'
,
's'
,
't'
,
'f'
)),
is_old_spec
(
IS_OLD_INDIC_TAG
(
map
->
get_chosen_script
(
0
)))
{}
const
hb_ot_map_t
*
map
;
const
hb_ot_map_t
*
map
;
feature_t
pref
;
would_apply_feature_t
pref
;
feature_t
blwf
;
would_apply_feature_t
blwf
;
feature_t
pstf
;
would_apply_feature_t
pstf
;
bool
is_old_spec
;
};
};
static
indic_position_t
static
indic_position_t
consonant_position
(
hb_codepoint_t
u
,
consonant_position
(
hb_codepoint_t
u
,
const
consonant_position_closure_t
*
closure
,
const
indic_shape_plan_t
*
indic_plan
,
hb_font_t
*
font
)
hb_font_t
*
font
)
{
{
if
((
u
&
~
0x007F
)
==
0x1780
)
if
((
u
&
~
0x007F
)
==
0x1780
)
...
@@ -157,14 +159,14 @@ consonant_position (hb_codepoint_t u,
...
@@ -157,14 +159,14 @@ consonant_position (hb_codepoint_t u,
if
((
u
&
~
0x007F
)
==
0x1780
)
virama
=
0x17D2
;
/* Khmaer */
if
((
u
&
~
0x007F
)
==
0x1780
)
virama
=
0x17D2
;
/* Khmaer */
hb_codepoint_t
glyphs
[
2
];
hb_codepoint_t
glyphs
[
2
];
unsigned
int
virama_pos
=
IS_OLD_INDIC_TAG
(
closure
->
map
->
get_chosen_script
(
0
))
?
1
:
0
;
unsigned
int
virama_pos
=
indic_plan
->
is_old_spec
?
1
:
0
;
font
->
get_glyph
(
virama
,
0
,
&
glyphs
[
virama_pos
]);
font
->
get_glyph
(
virama
,
0
,
&
glyphs
[
virama_pos
]);
font
->
get_glyph
(
u
,
0
,
&
glyphs
[
1
-
virama_pos
]);
font
->
get_glyph
(
u
,
0
,
&
glyphs
[
1
-
virama_pos
]);
hb_face_t
*
face
=
font
->
face
;
hb_face_t
*
face
=
font
->
face
;
if
(
closure
->
pref
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_BELOW_C
;
if
(
indic_plan
->
pref
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_BELOW_C
;
if
(
closure
->
blwf
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_BELOW_C
;
if
(
indic_plan
->
blwf
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_BELOW_C
;
if
(
closure
->
pstf
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_POST_C
;
if
(
indic_plan
->
pstf
.
would_substitute
(
glyphs
,
ARRAY_LENGTH
(
glyphs
),
face
))
return
POS_POST_C
;
return
POS_BASE_C
;
return
POS_BASE_C
;
}
}
...
@@ -269,7 +271,7 @@ is_halant_or_coeng (const hb_glyph_info_t &info)
...
@@ -269,7 +271,7 @@ is_halant_or_coeng (const hb_glyph_info_t &info)
static
inline
void
static
inline
void
set_indic_properties
(
hb_glyph_info_t
&
info
,
set_indic_properties
(
hb_glyph_info_t
&
info
,
const
consonant_position_closure
_t
*
closure
,
const
indic_shape_plan
_t
*
closure
,
hb_font_t
*
font
)
hb_font_t
*
font
)
{
{
hb_codepoint_t
u
=
info
.
codepoint
;
hb_codepoint_t
u
=
info
.
codepoint
;
...
@@ -471,11 +473,11 @@ setup_masks_indic (const hb_ot_complex_shaper_t *shaper,
...
@@ -471,11 +473,11 @@ setup_masks_indic (const hb_ot_complex_shaper_t *shaper,
/* We cannot setup masks here. We save information about characters
/* We cannot setup masks here. We save information about characters
* and setup masks later on in a pause-callback. */
* and setup masks later on in a pause-callback. */
consonant_position_closure_t
closure
(
map
);
indic_shape_plan_t
indic_plan
(
map
);
unsigned
int
count
=
buffer
->
len
;
unsigned
int
count
=
buffer
->
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
set_indic_properties
(
buffer
->
info
[
i
],
&
closure
,
font
);
set_indic_properties
(
buffer
->
info
[
i
],
&
indic_plan
,
font
);
}
}
static
int
static
int
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录