Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9b6312f9
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,发现更多精彩内容 >>
提交
9b6312f9
编写于
5月 06, 2016
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[use] Update to draft spec from Andrew Glass from August 2015
上级
3e4e7616
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
93 addition
and
106 deletion
+93
-106
src/gen-use-table.py
src/gen-use-table.py
+15
-14
src/hb-ot-shape-complex-use-machine.rl
src/hb-ot-shape-complex-use-machine.rl
+3
-12
src/hb-ot-shape-complex-use-private.hh
src/hb-ot-shape-complex-use-private.hh
+0
-1
src/hb-ot-shape-complex-use-table.cc
src/hb-ot-shape-complex-use-table.cc
+70
-72
src/hb-ot-shape-complex-use.cc
src/hb-ot-shape-complex-use.cc
+4
-7
test/shaping/fonts/sha1sum/6ff0fbead4462d9f229167b4e6839eceb8465058.ttf
...onts/sha1sum/6ff0fbead4462d9f229167b4e6839eceb8465058.ttf
+0
-0
test/shaping/tests/use.tests
test/shaping/tests/use.tests
+1
-0
未找到文件。
src/gen-use-table.py
浏览文件 @
9b6312f9
...
...
@@ -144,36 +144,38 @@ globals().update(property_values)
def
is_BASE
(
U
,
UISC
,
UGC
):
return
(
UISC
in
[
Number
,
Consonant
,
Consonant_Head_Letter
,
#SPEC-OUTDATED Consonant_Placeholder,
Tone_Letter
]
or
#SPEC-DRAFT Consonant_Placeholder,
Tone_Letter
,
Vowel_Independent
#SPEC-DRAFT
]
or
(
UGC
==
Lo
and
UISC
in
[
Avagraha
,
Bindu
,
Consonant_Final
,
Consonant_Medial
,
Consonant_Subjoined
,
Vowel
,
Vowel_Dependent
]))
def
is_BASE_VOWEL
(
U
,
UISC
,
UGC
):
return
UISC
==
Vowel_Independent
def
is_BASE_IND
(
U
,
UISC
,
UGC
):
#SPEC-
BROKEN
return (UISC in [Consonant_Dead, Modifying_Letter] or UGC == Po)
#SPEC-
DRAFT
return (UISC in [Consonant_Dead, Modifying_Letter] or UGC == Po)
return
(
UISC
in
[
Consonant_Dead
,
Modifying_Letter
]
or
(
UGC
==
Po
and
not
is_BASE_OTHER
(
U
,
UISC
,
UGC
)))
# for 104E
(
UGC
==
Po
and
not
U
in
[
0x104E
,
0x2022
])
or
False
# SPEC-DRAFT-OUTDATED! U == 0x002D
)
def
is_BASE_NUM
(
U
,
UISC
,
UGC
):
return
UISC
==
Brahmi_Joining_Number
def
is_BASE_OTHER
(
U
,
UISC
,
UGC
):
if
UISC
==
Consonant_Placeholder
:
return
True
#SPEC-
OUTDATED
return
U
in
[
0x00A0
,
0x00D7
,
0x2015
,
0x2022
,
0x25CC
,
0x25FB
,
0x25FC
,
0x25FD
,
0x25FE
]
if
UISC
==
Consonant_Placeholder
:
return
True
#SPEC-
DRAFT
#SPEC-DRAFT return U in [0x00A0, 0x00D7, 0x2015, 0x2022, 0x25CC, 0x25FB, 0x25FC, 0x25FD, 0x25FE]
return
U
in
[
0x2015
,
0x2022
,
0x25FB
,
0x25FC
,
0x25FD
,
0x25FE
]
def
is_CGJ
(
U
,
UISC
,
UGC
):
return
U
==
0x034F
def
is_CONS_FINAL
(
U
,
UISC
,
UGC
):
return
((
UISC
==
Consonant_Final
and
UGC
!=
Lo
)
or
UISC
==
Consonant_Succeeding_Repha
)
def
is_CONS_FINAL_MOD
(
U
,
UISC
,
UGC
):
#SPEC-
OUTDATED
return UISC in [Consonant_Final_Modifier, Syllable_Modifier]
#SPEC-
DRAFT
return UISC in [Consonant_Final_Modifier, Syllable_Modifier]
return
UISC
==
Syllable_Modifier
def
is_CONS_MED
(
U
,
UISC
,
UGC
):
return
UISC
==
Consonant_Medial
and
UGC
!=
Lo
def
is_CONS_MOD
(
U
,
UISC
,
UGC
):
return
UISC
in
[
Nukta
,
Gemination_Mark
,
Consonant_Killer
]
def
is_CONS_SUB
(
U
,
UISC
,
UGC
):
#SPEC-
OUTDATED
return UISC == Consonant_Subjoined
#SPEC-
DRAFT
return UISC == Consonant_Subjoined
return
UISC
==
Consonant_Subjoined
and
UGC
!=
Lo
def
is_HALANT
(
U
,
UISC
,
UGC
):
return
UISC
in
[
Virama
,
Invisible_Stacker
]
...
...
@@ -200,8 +202,8 @@ def is_REPHA(U, UISC, UGC):
#SPEC-OUTDATED hack to categorize Consonant_With_Stacker and Consonant_Prefixed
return
UISC
in
[
Consonant_Preceding_Repha
,
Consonant_With_Stacker
,
Consonant_Prefixed
]
def
is_SYM
(
U
,
UISC
,
UGC
):
if
U
==
0x25CC
:
return
False
#SPEC-
OUTDATED
#SPEC-
OUTDATED
return UGC in [So, Sc] or UISC == Symbol_Letter
if
U
==
0x25CC
:
return
False
#SPEC-
DRAFT
#SPEC-
DRAFT
return UGC in [So, Sc] or UISC == Symbol_Letter
return
UGC
in
[
So
,
Sc
]
def
is_SYM_MOD
(
U
,
UISC
,
UGC
):
return
U
in
[
0x1B6B
,
0x1B6C
,
0x1B6D
,
0x1B6E
,
0x1B6F
,
0x1B70
,
0x1B71
,
0x1B72
,
0x1B73
]
...
...
@@ -216,7 +218,6 @@ def is_VOWEL_MOD(U, UISC, UGC):
use_mapping
=
{
'B'
:
is_BASE
,
'IV'
:
is_BASE_VOWEL
,
'IND'
:
is_BASE_IND
,
'N'
:
is_BASE_NUM
,
'GB'
:
is_BASE_OTHER
,
...
...
src/hb-ot-shape-complex-use-machine.rl
浏览文件 @
9b6312f9
...
...
@@ -44,7 +44,6 @@
O = 0; # OTHER
B = 1; # BASE
IV = 2; # BASE_VOWEL
IND = 3; # BASE_IND
N = 4; # BASE_NUM
GB = 5; # BASE_OTHER
...
...
@@ -96,11 +95,11 @@ vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*;
final_consonants = FAbv* FBlw* FPst* FM?;
virama_terminated_cluster =
R? (B | GB
| IV
) VS?
R? (B | GB) VS?
consonant_modifiers
H
;
consonant
_cluster =
standard
_cluster =
R? (B | GB) VS?
consonant_modifiers
medial_consonants
...
...
@@ -108,13 +107,6 @@ consonant_cluster =
vowel_modifiers
final_consonants
;
vowel_cluster =
R? (IV) VS?
consonant_modifiers
medial_consonants
vowel_modifiers
final_consonants
;
broken_cluster =
R?
...
...
@@ -134,8 +126,7 @@ other = any;
main := |*
independent_cluster => { found_syllable (independent_cluster); };
virama_terminated_cluster => { found_syllable (virama_terminated_cluster); };
consonant_cluster => { found_syllable (consonant_cluster); };
vowel_cluster => { found_syllable (vowel_cluster); };
standard_cluster => { found_syllable (standard_cluster); };
number_joiner_terminated_cluster => { found_syllable (number_joiner_terminated_cluster); };
numeral_cluster => { found_syllable (numeral_cluster); };
symbol_cluster => { found_syllable (symbol_cluster); };
...
...
src/hb-ot-shape-complex-use-private.hh
浏览文件 @
9b6312f9
...
...
@@ -46,7 +46,6 @@ enum use_category_t {
USE_O
=
0
,
/* OTHER */
USE_B
=
1
,
/* BASE */
USE_IV
=
2
,
/* BASE_VOWEL */
USE_IND
=
3
,
/* BASE_IND */
USE_N
=
4
,
/* BASE_NUM */
USE_GB
=
5
,
/* BASE_OTHER */
...
...
src/hb-ot-shape-complex-use-table.cc
浏览文件 @
9b6312f9
此差异已折叠。
点击以展开。
src/hb-ot-shape-complex-use.cc
浏览文件 @
9b6312f9
...
...
@@ -230,8 +230,7 @@ data_destroy_use (void *data)
enum
syllable_type_t
{
independent_cluster
,
virama_terminated_cluster
,
consonant_cluster
,
vowel_cluster
,
standard_cluster
,
number_joiner_terminated_cluster
,
numeral_cluster
,
symbol_cluster
,
...
...
@@ -322,8 +321,7 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan,
break
;
case
virama_terminated_cluster
:
case
consonant_cluster
:
case
vowel_cluster
:
case
standard_cluster
:
case
number_joiner_terminated_cluster
:
case
numeral_cluster
:
case
broken_cluster
:
...
...
@@ -426,15 +424,14 @@ reorder_syllable (hb_buffer_t *buffer, unsigned int start, unsigned int end)
/* Only a few syllable types need reordering. */
if
(
unlikely
(
!
(
FLAG_SAFE
(
syllable_type
)
&
(
FLAG
(
virama_terminated_cluster
)
|
FLAG
(
consonant_cluster
)
|
FLAG
(
vowel_cluster
)
|
FLAG
(
standard_cluster
)
|
FLAG
(
broken_cluster
)
|
0
))))
return
;
hb_glyph_info_t
*
info
=
buffer
->
info
;
#define BASE_FLAGS (FLAG (USE_B) | FLAG (USE_GB)
| FLAG (USE_IV)
)
#define BASE_FLAGS (FLAG (USE_B) | FLAG (USE_GB))
/* Move things forward. */
if
(
info
[
start
].
use_category
()
==
USE_R
&&
end
-
start
>
1
)
...
...
test/shaping/fonts/sha1sum/6ff0fbead4462d9f229167b4e6839eceb8465058.ttf
0 → 100644
浏览文件 @
9b6312f9
文件已添加
test/shaping/tests/use.tests
浏览文件 @
9b6312f9
fonts/sha1sum/fbb6c84c9e1fe0c39e152fbe845e51fd81f6748e.ttf::U+1B1B,U+1B44,U+1B13,U+1B3E:[gid3=0+990|gid7=0+2473|gid5=0@-293,-400+0]
fonts/sha1sum/4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf::U+1A48,U+1A58,U+1A25,U+1A48,U+1A58,U+1A25,U+1A6E,U+1A63:[uni1A48=0+1212|uni1A25=0+1912|uni1A58=0+0|uni1A48=3+1212|uni1A6E=3+0|uni1A25=3+1912|uni1A58=3+0|uni1A63=3+1212]
fonts/sha1sum/f518eb6f6b5eec2946c9fbbbde44e45d46f5e2ac.ttf::U+1A48,U+1A58,U+1A25,U+1A48,U+1A58,U+1A25,U+1A6E,U+1A63:[uni1A48=0+1212|uni1A25=0+1912|uni1A58=0+0|uni1A48=3+1212|uni1A6E=3+1211|uni1A25=3+1912|uni1A58=3+0|uni1A63=3+1212]
fonts/sha1sum/6ff0fbead4462d9f229167b4e6839eceb8465058.ttf::U+11103,U+11128:[u11103=0+857|u11128=0+0]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录