Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
339d3603
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看板
提交
339d3603
编写于
9月 03, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[subset] Wire up subset() call down to subtables
上级
7b2ef551
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
186 addition
and
13 deletion
+186
-13
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+36
-0
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+63
-4
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+45
-9
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+42
-0
未找到文件。
src/hb-ot-layout-common.hh
浏览文件 @
339d3603
...
@@ -702,6 +702,42 @@ struct Lookup
...
@@ -702,6 +702,42 @@ struct Lookup
return_trace
(
true
);
return_trace
(
true
);
}
}
template
<
typename
TSubTable
>
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
struct
Lookup
*
out
=
c
->
serializer
->
embed
(
*
this
);
if
(
unlikely
(
!
out
))
return_trace
(
false
);
/* Subset the actual subtables. */
/* TODO Drop empty ones, either by calling intersects() beforehand,
* or just dropping null offsets after. */
const
OffsetArrayOf
<
TSubTable
>&
subtables
=
get_subtables
<
TSubTable
>
();
OffsetArrayOf
<
TSubTable
>&
out_subtables
=
out
->
get_subtables
<
TSubTable
>
();
unsigned
int
count
=
subTable
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
struct
Wrapper
{
inline
Wrapper
(
const
TSubTable
&
subtable_
,
unsigned
int
lookup_type_
)
:
subtable
(
subtable_
),
lookup_type
(
lookup_type_
)
{}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
return
subtable
.
dispatch
(
c
,
lookup_type
);
}
private:
const
TSubTable
&
subtable
;
unsigned
int
lookup_type
;
}
wrapper
(
this
+
subtables
[
i
],
get_type
());
out_subtables
[
i
].
serialize_subset
(
c
,
wrapper
,
out
);
}
return_trace
(
true
);
}
template
<
typename
TSubTable
>
template
<
typename
TSubTable
>
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
339d3603
...
@@ -484,6 +484,13 @@ struct SinglePosFormat1
...
@@ -484,6 +484,13 @@ struct SinglePosFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -537,6 +544,13 @@ struct SinglePosFormat2
...
@@ -537,6 +544,13 @@ struct SinglePosFormat2
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -742,6 +756,13 @@ struct PairPosFormat1
...
@@ -742,6 +756,13 @@ struct PairPosFormat1
return_trace
((
this
+
pairSet
[
index
]).
apply
(
c
,
valueFormat
,
skippy_iter
.
idx
));
return_trace
((
this
+
pairSet
[
index
]).
apply
(
c
,
valueFormat
,
skippy_iter
.
idx
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -828,6 +849,13 @@ struct PairPosFormat2
...
@@ -828,6 +849,13 @@ struct PairPosFormat2
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1040,6 +1068,13 @@ struct CursivePosFormat1
...
@@ -1040,6 +1068,13 @@ struct CursivePosFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1140,6 +1175,13 @@ struct MarkBasePosFormat1
...
@@ -1140,6 +1175,13 @@ struct MarkBasePosFormat1
return_trace
((
this
+
markArray
).
apply
(
c
,
mark_index
,
base_index
,
this
+
baseArray
,
classCount
,
skippy_iter
.
idx
));
return_trace
((
this
+
markArray
).
apply
(
c
,
mark_index
,
base_index
,
this
+
baseArray
,
classCount
,
skippy_iter
.
idx
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1259,6 +1301,13 @@ struct MarkLigPosFormat1
...
@@ -1259,6 +1301,13 @@ struct MarkLigPosFormat1
return_trace
((
this
+
markArray
).
apply
(
c
,
mark_index
,
comp_index
,
lig_attach
,
classCount
,
j
));
return_trace
((
this
+
markArray
).
apply
(
c
,
mark_index
,
comp_index
,
lig_attach
,
classCount
,
j
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1375,6 +1424,13 @@ struct MarkMarkPosFormat1
...
@@ -1375,6 +1424,13 @@ struct MarkMarkPosFormat1
return_trace
((
this
+
mark1Array
).
apply
(
c
,
mark1_index
,
mark2_index
,
this
+
mark2Array
,
classCount
,
j
));
return_trace
((
this
+
mark1Array
).
apply
(
c
,
mark1_index
,
mark2_index
,
this
+
mark2Array
,
classCount
,
j
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1543,6 +1599,9 @@ struct PosLookup : Lookup
...
@@ -1543,6 +1599,9 @@ struct PosLookup : Lookup
inline
typename
context_t
::
return_t
dispatch
(
context_t
*
c
)
const
inline
typename
context_t
::
return_t
dispatch
(
context_t
*
c
)
const
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
);
}
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
);
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
return
Lookup
::
subset
<
SubTable
>
(
c
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
return
Lookup
::
sanitize
<
SubTable
>
(
c
);
}
{
return
Lookup
::
sanitize
<
SubTable
>
(
c
);
}
};
};
...
@@ -1563,11 +1622,11 @@ struct GPOS : GSUBGPOS
...
@@ -1563,11 +1622,11 @@ struct GPOS : GSUBGPOS
static
inline
void
position_finish_advances
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
static
inline
void
position_finish_advances
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
static
inline
void
position_finish_offsets
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
static
inline
void
position_finish_offsets
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
return
GSUBGPOS
::
subset
<
PosLookup
>
(
c
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
return
GSUBGPOS
::
sanitize
<
PosLookup
>
(
c
);
}
TRACE_SANITIZE
(
this
);
return_trace
(
GSUBGPOS
::
sanitize
<
PosLookup
>
(
c
));
}
typedef
GSUBGPOS
::
accelerator_t
<
GPOS
>
accelerator_t
;
typedef
GSUBGPOS
::
accelerator_t
<
GPOS
>
accelerator_t
;
};
};
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
339d3603
...
@@ -102,6 +102,13 @@ struct SingleSubstFormat1
...
@@ -102,6 +102,13 @@ struct SingleSubstFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -184,6 +191,13 @@ struct SingleSubstFormat2
...
@@ -184,6 +191,13 @@ struct SingleSubstFormat2
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -387,6 +401,13 @@ struct MultipleSubstFormat1
...
@@ -387,6 +401,13 @@ struct MultipleSubstFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -570,6 +591,13 @@ struct AlternateSubstFormat1
...
@@ -570,6 +591,13 @@ struct AlternateSubstFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -911,6 +939,13 @@ struct LigatureSubstFormat1
...
@@ -911,6 +939,13 @@ struct LigatureSubstFormat1
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1101,6 +1136,13 @@ struct ReverseChainSingleSubstFormat1
...
@@ -1101,6 +1136,13 @@ struct ReverseChainSingleSubstFormat1
return_trace
(
false
);
return_trace
(
false
);
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1367,7 +1409,7 @@ struct SubstLookup : Lookup
...
@@ -1367,7 +1409,7 @@ struct SubstLookup : Lookup
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
);
}
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
);
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
return
false
;
}
//XXX
Lookup::subset<SubTable> (c); }
{
return
Lookup
::
subset
<
SubTable
>
(
c
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
return
Lookup
::
sanitize
<
SubTable
>
(
c
);
}
{
return
Lookup
::
sanitize
<
SubTable
>
(
c
);
}
...
@@ -1386,16 +1428,10 @@ struct GSUB : GSUBGPOS
...
@@ -1386,16 +1428,10 @@ struct GSUB : GSUBGPOS
{
return
CastR
<
SubstLookup
>
(
GSUBGPOS
::
get_lookup
(
i
));
}
{
return
CastR
<
SubstLookup
>
(
GSUBGPOS
::
get_lookup
(
i
));
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
{
return
GSUBGPOS
::
subset
<
SubstLookup
>
(
c
);
}
TRACE_SUBSET
(
this
);
return_trace
(
GSUBGPOS
::
subset
<
SubstLookup
>
(
c
));
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
return
GSUBGPOS
::
sanitize
<
SubstLookup
>
(
c
);
}
TRACE_SANITIZE
(
this
);
return_trace
(
GSUBGPOS
::
sanitize
<
SubstLookup
>
(
c
));
}
typedef
GSUBGPOS
::
accelerator_t
<
GSUB
>
accelerator_t
;
typedef
GSUBGPOS
::
accelerator_t
<
GSUB
>
accelerator_t
;
};
};
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
339d3603
...
@@ -1435,6 +1435,13 @@ struct ContextFormat1
...
@@ -1435,6 +1435,13 @@ struct ContextFormat1
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1547,6 +1554,13 @@ struct ContextFormat2
...
@@ -1547,6 +1554,13 @@ struct ContextFormat2
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -1648,6 +1662,13 @@ struct ContextFormat3
...
@@ -1648,6 +1662,13 @@ struct ContextFormat3
return_trace
(
context_apply_lookup
(
c
,
glyphCount
,
(
const
HBUINT16
*
)
(
coverageZ
+
1
),
lookupCount
,
lookupRecord
,
lookup_context
));
return_trace
(
context_apply_lookup
(
c
,
glyphCount
,
(
const
HBUINT16
*
)
(
coverageZ
+
1
),
lookupCount
,
lookupRecord
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -2076,6 +2097,13 @@ struct ChainContextFormat1
...
@@ -2076,6 +2097,13 @@ struct ChainContextFormat1
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -2209,6 +2237,13 @@ struct ChainContextFormat2
...
@@ -2209,6 +2237,13 @@ struct ChainContextFormat2
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
return_trace
(
rule_set
.
apply
(
c
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -2352,6 +2387,13 @@ struct ChainContextFormat3
...
@@ -2352,6 +2387,13 @@ struct ChainContextFormat3
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
));
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
));
}
}
inline
bool
subset
(
hb_subset_context_t
*
c
)
const
{
TRACE_SUBSET
(
this
);
// TODO(subset)
return_trace
(
false
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录