Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b5db4f1e
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
b5db4f1e
编写于
5月 10, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up NO_INDEX
上级
fe9bc070
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
23 deletion
+16
-23
src/hb-open-file-private.hh
src/hb-open-file-private.hh
+1
-1
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+6
-4
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+4
-13
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+4
-4
src/main.cc
src/main.cc
+1
-1
未找到文件。
src/hb-open-file-private.hh
浏览文件 @
b5db4f1e
...
...
@@ -87,7 +87,7 @@ typedef struct OffsetTable
return
true
;
}
}
if
(
table_index
)
*
table_index
=
NO
_INDEX
;
if
(
table_index
)
*
table_index
=
Index
::
NOT_FOUND
_INDEX
;
return
false
;
}
inline
const
TableDirectory
&
get_table_by_tag
(
hb_tag_t
tag
)
const
...
...
src/hb-open-type-private.hh
浏览文件 @
b5db4f1e
...
...
@@ -32,10 +32,6 @@
#include "hb-blob.h"
/* Table/script/language-system/feature/... not found */
#define NO_INDEX ((unsigned int) 0xFFFF)
/*
* Casts
...
...
@@ -418,6 +414,12 @@ DEFINE_NULL_DATA (Tag, " ");
/* Glyph index number, same as uint16 (length = 16 bits) */
typedef
USHORT
GlyphID
;
/* Script/language-system/feature index */
struct
Index
:
USHORT
{
static
const
unsigned
int
NOT_FOUND_INDEX
=
0xFFFF
;
};
DEFINE_NULL_DATA
(
Index
,
"
\xff\xff
"
);
/* Offset to a table, same as uint16 (length = 16 bits), Null offset = 0x0000 */
typedef
USHORT
Offset
;
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
b5db4f1e
...
...
@@ -99,7 +99,7 @@ struct RecordArrayOf : ArrayOf<Record<Type> > {
return
true
;
}
}
if
(
index
)
*
index
=
NO
_INDEX
;
if
(
index
)
*
index
=
Index
::
NOT_FOUND
_INDEX
;
return
false
;
}
};
...
...
@@ -117,17 +117,8 @@ struct RecordListOf : RecordArrayOf<Type>
};
struct
IndexArray
:
ArrayOf
<
USHORT
>
struct
IndexArray
:
ArrayOf
<
Index
>
{
inline
USHORT
operator
[]
(
unsigned
int
i
)
const
{
if
(
unlikely
(
i
>=
this
->
len
))
{
USHORT
u
;
u
.
set
(
NO_INDEX
);
return
u
;
}
return
this
->
array
[
i
];
}
inline
unsigned
int
get_indexes
(
unsigned
int
start_offset
,
unsigned
int
*
_count
/* IN/OUT */
,
unsigned
int
*
_indexes
/* OUT */
)
const
...
...
@@ -163,7 +154,7 @@ struct LangSys
inline
int
get_required_feature_index
(
void
)
const
{
if
(
reqFeatureIndex
==
0xffff
)
return
NO
_INDEX
;
return
Index
::
NOT_FOUND
_INDEX
;
return
reqFeatureIndex
;;
}
...
...
@@ -197,7 +188,7 @@ struct Script
{
return
langSys
.
get_tags
(
start_offset
,
lang_sys_count
,
lang_sys_tags
);
}
inline
const
LangSys
&
get_lang_sys
(
unsigned
int
i
)
const
{
if
(
i
==
NO
_INDEX
)
return
get_default_lang_sys
();
if
(
i
==
Index
::
NOT_FOUND
_INDEX
)
return
get_default_lang_sys
();
return
this
+
langSys
[
i
].
offset
;
}
inline
bool
find_lang_sys_index
(
hb_tag_t
tag
,
unsigned
int
*
index
)
const
...
...
src/hb-ot-layout.cc
浏览文件 @
b5db4f1e
...
...
@@ -360,7 +360,7 @@ hb_ot_layout_table_find_script (hb_face_t *face,
hb_tag_t
script_tag
,
unsigned
int
*
script_index
)
{
ASSERT_STATIC
(
NO
_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
ASSERT_STATIC
(
Index
::
NOT_FOUND
_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
face
,
table_tag
);
if
(
g
.
find_script_index
(
script_tag
,
script_index
))
...
...
@@ -384,7 +384,7 @@ hb_ot_layout_table_choose_script (hb_face_t *face,
const
hb_tag_t
*
script_tags
,
unsigned
int
*
script_index
)
{
ASSERT_STATIC
(
NO
_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
ASSERT_STATIC
(
Index
::
NOT_FOUND
_INDEX
==
HB_OT_LAYOUT_NO_SCRIPT_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
face
,
table_tag
);
while
(
*
script_tags
)
...
...
@@ -439,7 +439,7 @@ hb_ot_layout_script_find_language (hb_face_t *face,
hb_tag_t
language_tag
,
unsigned
int
*
language_index
)
{
ASSERT_STATIC
(
NO
_INDEX
==
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
);
ASSERT_STATIC
(
Index
::
NOT_FOUND
_INDEX
==
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
);
const
Script
&
s
=
get_gsubgpos_table
(
face
,
table_tag
).
get_script
(
script_index
);
if
(
s
.
find_lang_sys_index
(
language_tag
,
language_index
))
...
...
@@ -515,7 +515,7 @@ hb_ot_layout_language_find_feature (hb_face_t *face,
hb_tag_t
feature_tag
,
unsigned
int
*
feature_index
)
{
ASSERT_STATIC
(
NO
_INDEX
==
HB_OT_LAYOUT_NO_FEATURE_INDEX
);
ASSERT_STATIC
(
Index
::
NOT_FOUND
_INDEX
==
HB_OT_LAYOUT_NO_FEATURE_INDEX
);
const
GSUBGPOS
&
g
=
get_gsubgpos_table
(
face
,
table_tag
);
const
LangSys
&
l
=
g
.
get_script
(
script_index
).
get_lang_sys
(
language_index
);
...
...
src/main.cc
浏览文件 @
b5db4f1e
...
...
@@ -126,7 +126,7 @@ main (int argc, char **argv)
?
" Default Language System
\n
"
:
" Language System %2d of %2d: %.4s
\n
"
,
n_langsys
,
num_langsys
,
(
const
char
*
)
script
.
get_lang_sys_tag
(
n_langsys
));
if
(
langsys
.
get_required_feature_index
()
==
NO
_INDEX
)
if
(
langsys
.
get_required_feature_index
()
==
Index
::
NOT_FOUND
_INDEX
)
printf
(
" No required feature
\n
"
);
int
num_features
=
langsys
.
get_feature_count
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录