Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c4a59de6
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看板
提交
c4a59de6
编写于
6月 28, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Indic] Generate a single data table instead of multiple ones
上级
a346e923
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
44 deletion
+48
-44
src/gen-indic-table.py
src/gen-indic-table.py
+18
-12
src/hb-ot-shape-complex-indic-table.hh
src/hb-ot-shape-complex-indic-table.hh
+30
-32
未找到文件。
src/gen-indic-table.py
浏览文件 @
c4a59de6
...
...
@@ -148,8 +148,10 @@ uu.sort ()
last
=
-
1
num
=
0
total
=
0
tables
=
[]
offset
=
0
starts
=
[]
ends
=
[]
print
"static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {"
for
u
in
uu
:
if
u
<=
last
:
continue
...
...
@@ -162,26 +164,30 @@ for u in uu:
last
=
start
-
1
else
:
if
last
>=
0
:
print
print
"};"
print
print
"static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x%04x[] ="
%
start
print
"
{"
,
table
s
.
append
(
start
)
ends
.
append
(
last
+
1
)
offset
+=
ends
[
-
1
]
-
starts
[
-
1
]
print
print
print
"
#define indic_offset_0x%04x %d"
%
(
start
,
offset
)
start
s
.
append
(
start
)
print_block
(
block
,
start
,
end
,
data
)
last
=
end
ends
.
append
(
last
+
1
)
offset
+=
ends
[
-
1
]
-
starts
[
-
1
]
print
print
"};"
print
print
"#define indic_offset_total %d"
%
offset
print
print
"};"
print
print
"static INDIC_TABLE_ELEMENT_TYPE"
print
"get_indic_categories (hb_codepoint_t u)"
print
"{"
for
u
in
tables
:
t
=
"indic_table_0x%04x"
%
u
print
" if (0x%04X <= u && u <= 0x%04X
+ ARRAY_LENGTH (%s)) return %s[u - 0x%04X];"
%
(
u
,
u
,
t
,
t
,
u
)
for
(
start
,
end
)
in
zip
(
starts
,
ends
)
:
offset
=
"indic_offset_0x%04x"
%
start
print
" if (0x%04X <= u && u <= 0x%04X
) return indic_table[u - 0x%04X + %s];"
%
(
start
,
end
,
start
,
offset
)
for
u
,
d
in
singles
.
items
():
print
" if (unlikely (u == 0x%04X)) return _(%s,%s);"
%
(
u
,
short
[
0
][
d
[
0
]],
short
[
1
][
d
[
1
]])
print
" return _(x,x);"
...
...
src/hb-ot-shape-complex-indic-table.hh
浏览文件 @
c4a59de6
...
...
@@ -89,8 +89,11 @@ HB_BEGIN_DECLS
#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M)
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x0900
[]
=
{
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table
[
4080
]
=
{
#define indic_offset_0x0900 0
/* Devanagari (0900..097F) */
...
...
@@ -377,10 +380,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x0900[] =
/* 1088 */
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
C
,
x
),
_
(
TM
,
x
),
/* 1090 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 1098 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
TM
,
x
),
_
(
TM
,
x
),
_
(
M
,
R
),
_
(
M
,
T
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x1700
[]
=
{
#define indic_offset_0x1700 1952
/* Tagalog (1700..171F) */
...
...
@@ -428,10 +430,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x1700[] =
/* 17E8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 17F0 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 17F8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x1900
[]
=
{
#define indic_offset_0x1900 2208
/* Limbu (1900..194F) */
...
...
@@ -504,10 +505,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x1900[] =
/* 1A98 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 1AA0 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 1AA8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x1b00
[]
=
{
#define indic_offset_0x1b00 2640
/* Balinese (1B00..1B7F) */
...
...
@@ -562,10 +562,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x1b00[] =
/* 1C38 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 1C40 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 1C48 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
C
,
x
),
_
(
C
,
x
),
_
(
C
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0xa800
[]
=
{
#define indic_offset_0xa800 2976
/* Syloti Nagri (A800..A82F) */
...
...
@@ -697,10 +696,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0xa800[] =
/* AAC8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* AAD0 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* AAD8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0xabc0
[]
=
{
#define indic_offset_0xabc0 3712
/* Meetei Mayek (ABC0..ABFF) */
...
...
@@ -712,10 +710,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0xabc0[] =
/* ABE8 */
_
(
M
,
B
),
_
(
M
,
R
),
_
(
M
,
R
),
_
(
x
,
x
),
_
(
TM
,
x
),
_
(
V
,
B
),
_
(
x
,
x
),
_
(
x
,
x
),
/* ABF0 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* ABF8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x10a00
[]
=
{
#define indic_offset_0x10a00 3776
/* Kharoshthi (10A00..10A5F) */
...
...
@@ -731,10 +728,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x10a00[] =
/* 10A48 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 10A50 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 10A58 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
static
const
INDIC_TABLE_ELEMENT_TYPE
indic_table_0x11000
[]
=
{
#define indic_offset_0x11000 3872
/* Brahmi (11000..1107F) */
...
...
@@ -767,20 +763,22 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table_0x11000[] =
/* 110B8 */
_
(
M
,
R
),
_
(
V
,
B
),
_
(
N
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 110C0 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
/* 110C8 */
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
_
(
x
,
x
),
};
#define indic_offset_total 4080
};
static
INDIC_TABLE_ELEMENT_TYPE
get_indic_categories
(
hb_codepoint_t
u
)
{
if
(
0x0900
<=
u
&&
u
<=
0x
0900
+
ARRAY_LENGTH
(
indic_table_0x0900
))
return
indic_table_0x0900
[
u
-
0x0900
];
if
(
0x1700
<=
u
&&
u
<=
0x1
700
+
ARRAY_LENGTH
(
indic_table_0x1700
))
return
indic_table_0x1700
[
u
-
0x1700
];
if
(
0x1900
<=
u
&&
u
<=
0x1
900
+
ARRAY_LENGTH
(
indic_table_0x1900
))
return
indic_table_0x1900
[
u
-
0x1900
];
if
(
0x1B00
<=
u
&&
u
<=
0x1
B00
+
ARRAY_LENGTH
(
indic_table_0x1b00
))
return
indic_table_0x1b00
[
u
-
0x1B
00
];
if
(
0xA800
<=
u
&&
u
<=
0xA
800
+
ARRAY_LENGTH
(
indic_table_0xa800
))
return
indic_table_0xa800
[
u
-
0xA
800
];
if
(
0xABC0
<=
u
&&
u
<=
0xA
BC0
+
ARRAY_LENGTH
(
indic_table_0xabc0
))
return
indic_table_0xabc0
[
u
-
0xABC
0
];
if
(
0x10A00
<=
u
&&
u
<=
0x10A
00
+
ARRAY_LENGTH
(
indic_table_0x10a00
))
return
indic_table_0x10a00
[
u
-
0x10A
00
];
if
(
0x11000
<=
u
&&
u
<=
0x110
00
+
ARRAY_LENGTH
(
indic_table_0x11000
))
return
indic_table_0x11000
[
u
-
0x11000
];
if
(
0x0900
<=
u
&&
u
<=
0x
10A0
)
return
indic_table
[
u
-
0x0900
+
indic_offset_
0x0900
];
if
(
0x1700
<=
u
&&
u
<=
0x1
800
)
return
indic_table
[
u
-
0x1700
+
indic_offset_
0x1700
];
if
(
0x1900
<=
u
&&
u
<=
0x1
AB0
)
return
indic_table
[
u
-
0x1900
+
indic_offset_
0x1900
];
if
(
0x1B00
<=
u
&&
u
<=
0x1
C50
)
return
indic_table
[
u
-
0x1B00
+
indic_offset_0x1b
00
];
if
(
0xA800
<=
u
&&
u
<=
0xA
AE0
)
return
indic_table
[
u
-
0xA800
+
indic_offset_0xa
800
];
if
(
0xABC0
<=
u
&&
u
<=
0xA
C00
)
return
indic_table
[
u
-
0xABC0
+
indic_offset_0xabc
0
];
if
(
0x10A00
<=
u
&&
u
<=
0x10A
60
)
return
indic_table
[
u
-
0x10A00
+
indic_offset_0x10a
00
];
if
(
0x11000
<=
u
&&
u
<=
0x110
D0
)
return
indic_table
[
u
-
0x11000
+
indic_offset_
0x11000
];
if
(
unlikely
(
u
==
0x00A0
))
return
_
(
CP
,
x
);
if
(
unlikely
(
u
==
0x25CC
))
return
_
(
CP
,
x
);
return
_
(
x
,
x
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录