Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
a685bfe8
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看板
提交
a685bfe8
编写于
12月 30, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Separate GlyphID from HBUINT16
For stricter enforcement.
上级
8ac64d00
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
8 deletion
+12
-8
src/hb-dsalgs.hh
src/hb-dsalgs.hh
+4
-4
src/hb-open-type.hh
src/hb-open-type.hh
+1
-1
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+1
-1
src/hb-ot-shape-complex-arabic-fallback.hh
src/hb-ot-shape-complex-arabic-fallback.hh
+6
-2
未找到文件。
src/hb-dsalgs.hh
浏览文件 @
a685bfe8
...
...
@@ -497,8 +497,8 @@ static inline void hb_sort_r(void *base, size_t nel, size_t width,
}
template
<
typename
T
,
typename
T2
>
static
inline
void
hb_stable_sort
(
T
*
array
,
unsigned
int
len
,
int
(
*
compar
)(
const
T
*
,
const
T
*
),
T2
*
array2
)
template
<
typename
T
,
typename
T2
,
typename
T3
>
static
inline
void
hb_stable_sort
(
T
*
array
,
unsigned
int
len
,
int
(
*
compar
)(
const
T
2
*
,
const
T2
*
),
T3
*
array2
)
{
for
(
unsigned
int
i
=
1
;
i
<
len
;
i
++
)
{
...
...
@@ -515,8 +515,8 @@ hb_stable_sort (T *array, unsigned int len, int(*compar)(const T *, const T *),
}
if
(
array2
)
{
T
2
t
=
array2
[
i
];
memmove
(
&
array2
[
j
+
1
],
&
array2
[
j
],
(
i
-
j
)
*
sizeof
(
T
2
));
T
3
t
=
array2
[
i
];
memmove
(
&
array2
[
j
+
1
],
&
array2
[
j
],
(
i
-
j
)
*
sizeof
(
T
3
));
array2
[
j
]
=
t
;
}
}
...
...
src/hb-open-type.hh
浏览文件 @
a685bfe8
...
...
@@ -151,7 +151,7 @@ struct Tag : HBUINT32
};
/* Glyph index number, same as uint16 (length = 16 bits) */
typedef
HBUINT16
GlyphID
;
struct
GlyphID
:
HBUINT16
{}
;
/* Script/language-system/feature index */
struct
Index
:
HBUINT16
{
...
...
src/hb-ot-layout-common.hh
浏览文件 @
a685bfe8
...
...
@@ -1208,7 +1208,7 @@ struct ClassDefFormat1
}
bool
serialize
(
hb_serialize_context_t
*
c
,
hb_array_t
<
const
HBUINT16
>
glyphs
,
hb_array_t
<
const
GlyphID
>
glyphs
,
hb_array_t
<
const
HBUINT16
>
klasses
)
{
TRACE_SERIALIZE
(
this
);
...
...
src/hb-ot-shape-complex-arabic-fallback.hh
浏览文件 @
a685bfe8
...
...
@@ -77,7 +77,9 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS
/* Bubble-sort or something equally good!
* May not be good-enough for presidential candidate interviews, but good-enough for us... */
hb_stable_sort
(
&
glyphs
[
0
],
num_glyphs
,
(
int
(
*
)(
const
OT
::
GlyphID
*
,
const
OT
::
GlyphID
*
))
OT
::
GlyphID
::
cmp
,
&
substitutes
[
0
]);
hb_stable_sort
(
&
glyphs
[
0
],
num_glyphs
,
(
int
(
*
)(
const
OT
::
HBUINT16
*
,
const
OT
::
HBUINT16
*
))
OT
::
GlyphID
::
cmp
,
&
substitutes
[
0
]);
/* Each glyph takes four bytes max, and there's some overhead. */
...
...
@@ -123,7 +125,9 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN
first_glyphs_indirection
[
num_first_glyphs
]
=
first_glyph_idx
;
num_first_glyphs
++
;
}
hb_stable_sort
(
&
first_glyphs
[
0
],
num_first_glyphs
,
(
int
(
*
)(
const
OT
::
GlyphID
*
,
const
OT
::
GlyphID
*
))
OT
::
GlyphID
::
cmp
,
&
first_glyphs_indirection
[
0
]);
hb_stable_sort
(
&
first_glyphs
[
0
],
num_first_glyphs
,
(
int
(
*
)(
const
OT
::
HBUINT16
*
,
const
OT
::
HBUINT16
*
))
OT
::
GlyphID
::
cmp
,
&
first_glyphs_indirection
[
0
]);
/* Now that the first-glyphs are sorted, walk again, populate ligatures. */
for
(
unsigned
int
i
=
0
;
i
<
num_first_glyphs
;
i
++
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录