Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
70fe77bb
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,发现更多精彩内容 >>
提交
70fe77bb
编写于
7月 16, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
上级
2f903215
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
22 deletion
+22
-22
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+22
-22
未找到文件。
src/hb-ot-shape-complex-indic.cc
浏览文件 @
70fe77bb
...
...
@@ -291,7 +291,7 @@ compare_indic_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
* https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx */
static
void
initial_reordering_consonant_syllable
(
const
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_mask_t
*
mask_array
,
initial_reordering_consonant_syllable
(
const
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_mask_t
*
basic_
mask_array
,
unsigned
int
start
,
unsigned
int
end
)
{
hb_glyph_info_t
*
info
=
buffer
->
info
;
...
...
@@ -319,7 +319,7 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
* and has more than one consonant, Ra is excluded from candidates for
* base consonants. */
unsigned
int
limit
=
start
;
if
(
mask_array
[
RPHF
]
&&
if
(
basic_
mask_array
[
RPHF
]
&&
start
+
3
<=
end
&&
info
[
start
].
indic_category
()
==
OT_Ra
&&
info
[
start
+
1
].
indic_category
()
==
OT_H
&&
...
...
@@ -480,17 +480,17 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
/* Reph */
for
(
unsigned
int
i
=
start
;
i
<
end
&&
info
[
i
].
indic_position
()
==
POS_RA_TO_BECOME_REPH
;
i
++
)
info
[
i
].
mask
|=
mask_array
[
RPHF
];
info
[
i
].
mask
|=
basic_
mask_array
[
RPHF
];
/* Pre-base */
mask
=
mask_array
[
HALF
]
|
mask_array
[
AKHN
]
|
mask_array
[
CJCT
];
mask
=
basic_mask_array
[
HALF
]
|
basic_mask_array
[
AKHN
]
|
basic_
mask_array
[
CJCT
];
for
(
unsigned
int
i
=
start
;
i
<
base
;
i
++
)
info
[
i
].
mask
|=
mask
;
/* Base */
mask
=
mask_array
[
AKHN
]
|
mask_array
[
CJCT
];
mask
=
basic_mask_array
[
AKHN
]
|
basic_
mask_array
[
CJCT
];
info
[
base
].
mask
|=
mask
;
/* Post-base */
mask
=
mask_array
[
BLWF
]
|
mask_array
[
ABVF
]
|
mask_array
[
PSTF
]
|
mask_array
[
CJCT
];
mask
=
basic_mask_array
[
BLWF
]
|
basic_mask_array
[
ABVF
]
|
basic_mask_array
[
PSTF
]
|
basic_
mask_array
[
CJCT
];
for
(
unsigned
int
i
=
base
+
1
;
i
<
end
;
i
++
)
info
[
i
].
mask
|=
mask
;
}
...
...
@@ -504,9 +504,9 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
do
{
j
--
;
info
[
j
].
mask
&=
~
mask_array
[
CJCT
];
info
[
j
].
mask
&=
~
basic_
mask_array
[
CJCT
];
if
(
non_joiner
)
info
[
j
].
mask
&=
~
mask_array
[
HALF
];
info
[
j
].
mask
&=
~
basic_
mask_array
[
HALF
];
}
while
(
j
>
start
&&
!
is_consonant
(
info
[
j
]));
}
...
...
@@ -516,17 +516,17 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
static
void
initial_reordering_vowel_syllable
(
const
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_mask_t
*
mask_array
,
hb_mask_t
*
basic_
mask_array
,
unsigned
int
start
,
unsigned
int
end
)
{
/* We made the vowels look like consonants. So let's call the consonant logic! */
initial_reordering_consonant_syllable
(
map
,
buffer
,
mask_array
,
start
,
end
);
initial_reordering_consonant_syllable
(
map
,
buffer
,
basic_
mask_array
,
start
,
end
);
}
static
void
initial_reordering_standalone_cluster
(
const
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_mask_t
*
mask_array
,
hb_mask_t
*
basic_
mask_array
,
unsigned
int
start
,
unsigned
int
end
)
{
/* We treat NBSP/dotted-circle as if they are consonants, so we should just chain.
...
...
@@ -541,13 +541,13 @@ initial_reordering_standalone_cluster (const hb_ot_map_t *map,
return
;
}
initial_reordering_consonant_syllable
(
map
,
buffer
,
mask_array
,
start
,
end
);
initial_reordering_consonant_syllable
(
map
,
buffer
,
basic_
mask_array
,
start
,
end
);
}
static
void
initial_reordering_non_indic
(
const
hb_ot_map_t
*
map
HB_UNUSED
,
hb_buffer_t
*
buffer
HB_UNUSED
,
hb_mask_t
*
mask_array
HB_UNUSED
,
hb_mask_t
*
basic_
mask_array
HB_UNUSED
,
unsigned
int
start
HB_UNUSED
,
unsigned
int
end
HB_UNUSED
)
{
/* Nothing to do right now. If we ever switch to using the output
...
...
@@ -562,16 +562,16 @@ initial_reordering (const hb_ot_map_t *map,
hb_buffer_t
*
buffer
,
void
*
user_data
HB_UNUSED
)
{
hb_mask_t
mask_array
[
ARRAY_LENGTH
(
indic_basic_features
)]
=
{
0
};
hb_mask_t
basic_
mask_array
[
ARRAY_LENGTH
(
indic_basic_features
)]
=
{
0
};
unsigned
int
num_masks
=
ARRAY_LENGTH
(
indic_basic_features
);
for
(
unsigned
int
i
=
0
;
i
<
num_masks
;
i
++
)
mask_array
[
i
]
=
map
->
get_1_mask
(
indic_basic_features
[
i
].
tag
);
basic_
mask_array
[
i
]
=
map
->
get_1_mask
(
indic_basic_features
[
i
].
tag
);
find_syllables
(
map
,
buffer
,
mask_array
);
find_syllables
(
map
,
buffer
,
basic_
mask_array
);
}
static
void
final_reordering_syllable
(
hb_buffer_t
*
buffer
,
hb_mask_t
*
mask_array
,
final_reordering_syllable
(
hb_buffer_t
*
buffer
,
hb_mask_t
*
other_
mask_array
,
unsigned
int
start
,
unsigned
int
end
)
{
hb_glyph_info_t
*
info
=
buffer
->
info
;
...
...
@@ -831,7 +831,7 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
)
|
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
)
|
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)))))
info
[
start
].
mask
|=
mask_array
[
INIT
];
info
[
start
].
mask
|=
other_
mask_array
[
INIT
];
...
...
@@ -866,21 +866,21 @@ final_reordering (const hb_ot_map_t *map,
unsigned
int
count
=
buffer
->
len
;
if
(
!
count
)
return
;
hb_mask_t
mask_array
[
ARRAY_LENGTH
(
indic_other_features
)]
=
{
0
};
hb_mask_t
other_
mask_array
[
ARRAY_LENGTH
(
indic_other_features
)]
=
{
0
};
unsigned
int
num_masks
=
ARRAY_LENGTH
(
indic_other_features
);
for
(
unsigned
int
i
=
0
;
i
<
num_masks
;
i
++
)
mask_array
[
i
]
=
map
->
get_1_mask
(
indic_other_features
[
i
].
tag
);
other_
mask_array
[
i
]
=
map
->
get_1_mask
(
indic_other_features
[
i
].
tag
);
hb_glyph_info_t
*
info
=
buffer
->
info
;
unsigned
int
last
=
0
;
unsigned
int
last_syllable
=
info
[
0
].
syllable
();
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
last_syllable
!=
info
[
i
].
syllable
())
{
final_reordering_syllable
(
buffer
,
mask_array
,
last
,
i
);
final_reordering_syllable
(
buffer
,
other_
mask_array
,
last
,
i
);
last
=
i
;
last_syllable
=
info
[
last
].
syllable
();
}
final_reordering_syllable
(
buffer
,
mask_array
,
last
,
count
);
final_reordering_syllable
(
buffer
,
other_
mask_array
,
last
,
count
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
indic_category
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
indic_position
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录