Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
963413fc
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看板
提交
963413fc
编写于
8月 26, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WIP
上级
e6cb9380
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
25 deletion
+51
-25
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+0
-1
src/hb-ot-face.hh
src/hb-ot-face.hh
+0
-22
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+2
-0
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+2
-0
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+30
-1
src/hb-ot-layout.hh
src/hb-ot-layout.hh
+17
-1
未找到文件。
src/hb-ot-cmap-table.hh
浏览文件 @
963413fc
...
...
@@ -1018,7 +1018,6 @@ struct cmap
{
inline
void
init
(
hb_face_t
*
face
)
{
/* TODO Switch to using table from face->ot.table. */
this
->
blob
=
hb_sanitize_context_t
().
reference_table
<
cmap
>
(
face
);
const
cmap
*
table
=
this
->
blob
->
as
<
cmap
>
();
const
CmapSubtableFormat14
*
subtable_uvs
=
nullptr
;
...
...
src/hb-ot-face.hh
浏览文件 @
963413fc
...
...
@@ -32,7 +32,6 @@
#include "hb.hh"
#include "hb-machinery.hh"
#include "hb-set-digest.hh"
#include "hb-ot-cmap-table.hh"
#include "hb-ot-glyf-table.hh"
...
...
@@ -46,27 +45,6 @@
* hb_ot_face_data_t
*/
struct
hb_ot_layout_lookup_accelerator_t
{
template
<
typename
TLookup
>
inline
void
init
(
const
TLookup
&
lookup
)
{
digest
.
init
();
lookup
.
add_coverage
(
&
digest
);
}
inline
void
fini
(
void
)
{
}
inline
bool
may_have
(
hb_codepoint_t
g
)
const
{
return
digest
.
may_have
(
g
);
}
private:
hb_set_digest_t
digest
;
};
/* Most of these tables are NOT needed for shaping. But we need to hook them *somewhere*.
* This is as good as any place. */
#define HB_OT_LAYOUT_TABLES \
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
963413fc
...
...
@@ -1522,6 +1522,8 @@ struct GPOS : GSUBGPOS
const
OffsetTo
<
PosLookupList
>
&
list
=
CastR
<
OffsetTo
<
PosLookupList
>
>
(
lookupList
);
return_trace
(
list
.
sanitize
(
c
,
this
));
}
typedef
GSUBGPOS
::
accelerator_t
<
GPOS
>
accelerator_t
;
};
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
963413fc
...
...
@@ -1317,6 +1317,8 @@ struct GSUB : GSUBGPOS
const
OffsetTo
<
SubstLookupList
>
&
list
=
CastR
<
OffsetTo
<
SubstLookupList
>
>
(
lookupList
);
return_trace
(
list
.
sanitize
(
c
,
this
));
}
typedef
GSUBGPOS
::
accelerator_t
<
GSUB
>
accelerator_t
;
};
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
963413fc
...
...
@@ -988,7 +988,6 @@ struct LookupRecord
DEFINE_SIZE_STATIC
(
4
);
};
template
<
typename
context_t
>
static
inline
void
recurse_lookups
(
context_t
*
c
,
unsigned
int
lookupCount
,
...
...
@@ -2382,6 +2381,36 @@ struct GSUBGPOS
(
version
.
to_int
()
<
0x00010001u
||
featureVars
.
sanitize
(
c
,
this
)));
}
template
<
typename
T
>
struct
accelerator_t
{
inline
void
init
(
hb_face_t
*
face
)
{
this
->
blob
=
hb_sanitize_context_t
().
reference_table
<
T
>
(
face
);
const
T
&
table
=
*
this
->
blob
->
as
<
T
>
();
this
->
lookup_count
=
table
.
get_lookup_count
();
this
->
accels
=
(
hb_ot_layout_lookup_accelerator_t
*
)
calloc
(
this
->
lookup_count
,
sizeof
(
hb_ot_layout_lookup_accelerator_t
));
if
(
unlikely
(
!
this
->
accels
))
this
->
lookup_count
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
this
->
lookup_count
;
i
++
)
this
->
accels
[
i
].
init
(
table
.
get_lookup
(
i
));
}
inline
void
fini
(
void
)
{
hb_blob_destroy
(
this
->
blob
);
free
(
accels
);
}
private:
hb_blob_t
*
blob
;
unsigned
int
lookup_count
;
hb_ot_layout_lookup_accelerator_t
*
accels
;
};
protected:
FixedVersion
<>
version
;
/* Version of the GSUB/GPOS table--initially set
* to 0x00010000u */
...
...
src/hb-ot-layout.hh
浏览文件 @
963413fc
...
...
@@ -34,6 +34,7 @@
#include "hb-font.hh"
#include "hb-buffer.hh"
#include "hb-open-type.hh"
#include "hb-set-digest.hh"
/* Private API corresponding to hb-ot-layout.h: */
...
...
@@ -86,7 +87,22 @@ hb_ot_layout_substitute_start (hb_font_t *font,
hb_buffer_t
*
buffer
);
struct
hb_ot_layout_lookup_accelerator_t
;
struct
hb_ot_layout_lookup_accelerator_t
{
template
<
typename
TLookup
>
inline
void
init
(
const
TLookup
&
lookup
)
{
digest
.
init
();
lookup
.
add_coverage
(
&
digest
);
}
inline
void
fini
(
void
)
{}
inline
bool
may_have
(
hb_codepoint_t
g
)
const
{
return
digest
.
may_have
(
g
);
}
private:
hb_set_digest_t
digest
;
};
namespace
OT
{
struct
hb_ot_apply_context_t
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录