Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
26e0cbd8
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看板
未验证
提交
26e0cbd8
编写于
3月 29, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
3月 29, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Actual py3 compatibility making on gen-* scripts (#941)
上级
cab2c2c0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
17 deletion
+18
-17
src/gen-arabic-table.py
src/gen-arabic-table.py
+2
-4
src/gen-indic-table.py
src/gen-indic-table.py
+5
-8
src/gen-use-table.py
src/gen-use-table.py
+9
-3
test/shaping/hb_test_tools.py
test/shaping/hb_test_tools.py
+2
-2
未找到文件。
src/gen-arabic-table.py
浏览文件 @
26e0cbd8
...
...
@@ -9,7 +9,7 @@ if len (sys.argv) != 4:
print
(
"usage: ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt"
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
files
=
[
file
(
x
)
for
x
in
sys
.
argv
[
1
:]]
files
=
[
open
(
x
)
for
x
in
sys
.
argv
[
1
:]]
headers
=
[[
files
[
0
].
readline
(),
files
[
0
].
readline
()],
[
files
[
2
].
readline
(),
files
[
2
].
readline
()]]
headers
.
append
([
"UnicodeData.txt does not have a header."
])
...
...
@@ -229,9 +229,7 @@ def print_shaping_table(f):
print
(
" } ligatures[%d];"
%
max_i
)
print
(
"} ligature_table[] ="
)
print
(
"{"
)
keys
=
ligas
.
keys
()
keys
.
sort
()
for
first
in
keys
:
for
first
in
sorted
(
ligas
.
keys
()):
print
(
" { 0x%04Xu, {"
%
(
first
))
for
liga
in
ligas
[
first
]:
...
...
src/gen-indic-table.py
浏览文件 @
26e0cbd8
...
...
@@ -32,7 +32,7 @@ ALLOWED_BLOCKS = [
'Myanmar Extended-A'
,
]
files
=
[
file
(
x
)
for
x
in
sys
.
argv
[
1
:]]
files
=
[
open
(
x
)
for
x
in
sys
.
argv
[
1
:]]
headers
=
[[
f
.
readline
()
for
i
in
range
(
2
)]
for
f
in
files
]
...
...
@@ -133,8 +133,7 @@ what = ["INDIC_SYLLABIC_CATEGORY", "INDIC_MATRA_CATEGORY"]
what_short
=
[
"ISC"
,
"IMC"
]
for
i
in
range
(
2
):
print
()
vv
=
values
[
i
].
keys
()
vv
.
sort
()
vv
=
sorted
(
values
[
i
].
keys
())
for
v
in
vv
:
v_no_and
=
v
.
replace
(
'_And_'
,
'_'
)
if
v
in
short
[
i
]:
...
...
@@ -180,8 +179,7 @@ def print_block (block, start, end, data):
if
block
:
last_block
=
block
uu
=
data
.
keys
()
uu
.
sort
()
uu
=
sorted
(
data
.
keys
())
last
=
-
100000
num
=
0
...
...
@@ -228,7 +226,7 @@ print ("hb_indic_get_categories (hb_codepoint_t u)")
print
(
"{"
)
print
(
" switch (u >> %d)"
%
page_bits
)
print
(
" {"
)
pages
=
set
([
u
>>
page_bits
for
u
in
starts
+
ends
+
singles
.
keys
(
)])
pages
=
set
([
u
>>
page_bits
for
u
in
starts
+
ends
+
list
(
singles
.
keys
()
)])
for
p
in
sorted
(
pages
):
print
(
" case 0x%0Xu:"
%
p
)
for
u
,
d
in
singles
.
items
():
...
...
@@ -249,8 +247,7 @@ print ()
print
(
"#undef _"
)
for
i
in
range
(
2
):
print
vv
=
values
[
i
].
keys
()
vv
.
sort
()
vv
=
sorted
(
values
[
i
].
keys
())
for
v
in
vv
:
print
(
"#undef %s_%s"
%
(
what_short
[
i
],
short
[
i
][
v
]))
...
...
src/gen-use-table.py
浏览文件 @
26e0cbd8
...
...
@@ -10,7 +10,7 @@ if len (sys.argv) != 5:
BLACKLISTED_BLOCKS
=
[
"Thai"
,
"Lao"
,
"Tibetan"
]
files
=
[
file
(
x
)
for
x
in
sys
.
argv
[
1
:]]
files
=
[
open
(
x
)
for
x
in
sys
.
argv
[
1
:]]
headers
=
[[
f
.
readline
()
for
i
in
range
(
2
)]
for
j
,
f
in
enumerate
(
files
)
if
j
!=
2
]
headers
.
append
([
"UnicodeData.txt does not have a header."
])
...
...
@@ -126,6 +126,11 @@ property_names = [
'Overstruck'
,
]
try
:
basestring
except
NameError
:
basestring
=
str
class
PropertyValue
(
object
):
def
__init__
(
self
,
name_
):
self
.
name
=
name_
...
...
@@ -135,6 +140,8 @@ class PropertyValue(object):
return
self
.
name
==
(
other
if
isinstance
(
other
,
basestring
)
else
other
.
name
)
def
__ne__
(
self
,
other
):
return
not
(
self
==
other
)
def
__hash__
(
self
):
return
hash
(
str
(
self
))
property_values
=
{}
...
...
@@ -398,8 +405,7 @@ def print_block (block, start, end, data):
if
block
:
last_block
=
block
uu
=
data
.
keys
()
uu
.
sort
()
uu
=
sorted
(
data
.
keys
())
last
=
-
100000
num
=
0
...
...
test/shaping/hb_test_tools.py
浏览文件 @
26e0cbd8
...
...
@@ -514,7 +514,7 @@ class FileHelpers:
def
open_file_or_stdin
(
f
):
if
f
==
'-'
:
return
sys
.
stdin
return
file
(
f
)
return
open
(
f
)
class
Manifest
:
...
...
@@ -533,7 +533,7 @@ class Manifest:
if
os
.
path
.
isdir
(
s
):
try
:
m
=
file
(
os
.
path
.
join
(
s
,
"MANIFEST"
))
m
=
open
(
os
.
path
.
join
(
s
,
"MANIFEST"
))
items
=
[
x
.
strip
()
for
x
in
m
.
readlines
()]
for
f
in
items
:
for
p
in
Manifest
.
read
(
os
.
path
.
join
(
s
,
f
)):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录