Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
78d35f0e
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看板
提交
78d35f0e
编写于
5月 15, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce captures of lambdas
上级
5266ca86
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
31 addition
and
30 deletion
+31
-30
src/hb-ot-hdmx-table.hh
src/hb-ot-hdmx-table.hh
+2
-2
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+1
-1
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+15
-14
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+6
-6
src/hb-ot-name-table.hh
src/hb-ot-name-table.hh
+1
-1
src/hb-ot-stat-table.hh
src/hb-ot-stat-table.hh
+1
-1
src/hb-ot-var-fvar-table.hh
src/hb-ot-var-fvar-table.hh
+2
-2
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+1
-1
src/test-iter.cc
src/test-iter.cc
+2
-2
未找到文件。
src/hb-ot-hdmx-table.hh
浏览文件 @
78d35f0e
...
...
@@ -108,7 +108,7 @@ struct hdmx
this
->
sizeDeviceRecord
=
DeviceRecord
::
get_size
(
it
?
(
*
it
).
second
.
len
()
:
0
);
+
it
|
hb_apply
([
&
]
(
const
hb_item_type
<
Iterator
>&
_
)
{
|
hb_apply
([
c
]
(
const
hb_item_type
<
Iterator
>&
_
)
{
c
->
start_embed
<
DeviceRecord
>
()
->
serialize
(
c
,
_
.
first
,
_
.
second
);
})
;
...
...
@@ -126,7 +126,7 @@ struct hdmx
auto
it
=
+
hb_range
((
unsigned
)
numRecords
)
|
hb_map
([
&
]
(
unsigned
_
)
|
hb_map
([
c
,
this
]
(
unsigned
_
)
{
const
DeviceRecord
*
device_record
=
&
StructAtOffset
<
DeviceRecord
>
(
&
firstDeviceRecord
,
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
78d35f0e
...
...
@@ -726,7 +726,7 @@ struct PairPosFormat1
+
hb_zip
(
this
+
coverage
,
pairSet
)
|
hb_filter
(
*
glyphs
,
hb_first
)
|
hb_map
(
hb_second
)
|
hb_map
([
&
]
(
const
OffsetTo
<
PairSet
>
&
_
)
->
bool
|
hb_map
([
=
]
(
const
OffsetTo
<
PairSet
>
&
_
)
{
return
(
this
+
_
).
intersects
(
glyphs
,
valueFormat
);
})
|
hb_any
;
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
78d35f0e
...
...
@@ -46,9 +46,10 @@ struct SingleSubstFormat1
void
closure
(
hb_closure_context_t
*
c
)
const
{
unsigned
d
=
deltaGlyphID
;
+
hb_iter
(
this
+
coverage
)
|
hb_filter
(
*
c
->
glyphs
)
|
hb_map
([
&
]
(
hb_codepoint_t
g
)
{
return
(
g
+
deltaGlyphID
)
&
0xFFFFu
;
})
|
hb_map
([
d
]
(
hb_codepoint_t
g
)
{
return
(
g
+
d
)
&
0xFFFFu
;
})
|
hb_sink
(
c
->
output
)
;
}
...
...
@@ -56,9 +57,9 @@ struct SingleSubstFormat1
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
if
(
unlikely
(
!
(
this
+
coverage
).
add_coverage
(
c
->
input
)))
return
;
unsigned
d
=
deltaGlyphID
;
+
hb_iter
(
this
+
coverage
)
|
hb_map
([
&
]
(
hb_codepoint_t
g
)
{
return
(
g
+
deltaGlyphID
)
&
0xFFFFu
;
})
|
hb_map
([
d
]
(
hb_codepoint_t
g
)
{
return
(
g
+
d
)
&
0xFFFFu
;
})
|
hb_sink
(
c
->
output
)
;
}
...
...
@@ -351,7 +352,7 @@ struct MultipleSubstFormat1
+
hb_zip
(
this
+
coverage
,
sequence
)
|
hb_filter
(
*
c
->
glyphs
,
hb_first
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
Sequence
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
|
hb_apply
([
c
,
this
]
(
const
OffsetTo
<
Sequence
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
;
}
...
...
@@ -360,7 +361,7 @@ struct MultipleSubstFormat1
if
(
unlikely
(
!
(
this
+
coverage
).
add_coverage
(
c
->
input
)))
return
;
+
hb_zip
(
this
+
coverage
,
sequence
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
Sequence
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
|
hb_apply
([
c
,
this
]
(
const
OffsetTo
<
Sequence
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
;
}
...
...
@@ -525,7 +526,7 @@ struct AlternateSubstFormat1
{
+
hb_zip
(
this
+
coverage
,
alternateSet
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
AlternateSet
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
|
hb_apply
([
c
,
this
]
(
const
OffsetTo
<
AlternateSet
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
;
}
...
...
@@ -534,7 +535,7 @@ struct AlternateSubstFormat1
if
(
unlikely
(
!
(
this
+
coverage
).
add_coverage
(
c
->
input
)))
return
;
+
hb_zip
(
this
+
coverage
,
alternateSet
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
AlternateSet
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
|
hb_apply
([
c
,
this
]
(
const
OffsetTo
<
AlternateSet
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
;
}
...
...
@@ -741,7 +742,7 @@ struct LigatureSet
{
return
+
hb_iter
(
ligature
)
|
hb_map
([
&
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
return
(
this
+
_
).
intersects
(
glyphs
);
})
|
hb_map
([
this
,
glyphs
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
return
(
this
+
_
).
intersects
(
glyphs
);
})
|
hb_any
;
}
...
...
@@ -749,14 +750,14 @@ struct LigatureSet
void
closure
(
hb_closure_context_t
*
c
)
const
{
+
hb_iter
(
ligature
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
|
hb_apply
([
this
,
c
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
;
}
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
+
hb_iter
(
ligature
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
|
hb_apply
([
this
,
c
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
;
}
...
...
@@ -764,7 +765,7 @@ struct LigatureSet
{
return
+
hb_iter
(
ligature
)
|
hb_map
([
&
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
return
(
this
+
_
).
would_apply
(
c
);
})
|
hb_map
([
this
,
c
]
(
const
OffsetTo
<
Ligature
>
&
_
)
{
return
(
this
+
_
).
would_apply
(
c
);
})
|
hb_any
;
}
...
...
@@ -825,7 +826,7 @@ struct LigatureSubstFormat1
+
hb_zip
(
this
+
coverage
,
ligatureSet
)
|
hb_filter
(
*
glyphs
,
hb_first
)
|
hb_map
(
hb_second
)
|
hb_map
([
&
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
->
bool
|
hb_map
([
this
,
glyphs
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
{
return
(
this
+
_
).
intersects
(
glyphs
);
})
|
hb_any
;
...
...
@@ -836,7 +837,7 @@ struct LigatureSubstFormat1
+
hb_zip
(
this
+
coverage
,
ligatureSet
)
|
hb_filter
(
*
c
->
glyphs
,
hb_first
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
|
hb_apply
([
this
,
c
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
{
(
this
+
_
).
closure
(
c
);
})
;
}
...
...
@@ -846,7 +847,7 @@ struct LigatureSubstFormat1
+
hb_zip
(
this
+
coverage
,
ligatureSet
)
|
hb_map
(
hb_second
)
|
hb_apply
([
&
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
|
hb_apply
([
this
,
c
]
(
const
OffsetTo
<
LigatureSet
>
&
_
)
{
(
this
+
_
).
collect_glyphs
(
c
);
})
;
}
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
78d35f0e
...
...
@@ -1546,7 +1546,7 @@ struct ContextFormat2
return
+
hb_enumerate
(
ruleSet
)
|
hb_map
([
&
]
(
const
hb_pair_t
<
unsigned
,
const
OffsetTo
<
RuleSet
>
&>
p
)
->
bool
|
hb_map
([
&
]
(
const
hb_pair_t
<
unsigned
,
const
OffsetTo
<
RuleSet
>
&>
p
)
{
return
class_def
.
intersects_class
(
glyphs
,
p
.
first
)
&&
(
this
+
p
.
second
).
intersects
(
glyphs
,
lookup_context
);
})
|
hb_any
...
...
@@ -1567,7 +1567,7 @@ struct ContextFormat2
return
+
hb_enumerate
(
ruleSet
)
|
hb_filter
([
&
]
(
unsigned
_
)
->
bool
|
hb_filter
([
&
]
(
unsigned
_
)
{
return
class_def
.
intersects_class
(
c
->
glyphs
,
_
);
},
hb_first
)
|
hb_map
(
hb_second
)
...
...
@@ -2193,9 +2193,9 @@ struct ChainContextFormat2
return
+
hb_enumerate
(
ruleSet
)
|
hb_map
([
&
]
(
const
hb_pair_t
<
unsigned
,
const
OffsetTo
<
ChainRuleSet
>
&>
p
)
->
bool
{
return
input_class_def
.
intersects_class
(
glyphs
,
p
.
first
)
&&
(
this
+
p
.
second
).
intersects
(
glyphs
,
lookup_context
);
})
|
hb_map
([
&
]
(
const
hb_pair_t
<
unsigned
,
const
OffsetTo
<
ChainRuleSet
>
&>
p
)
{
return
input_class_def
.
intersects_class
(
glyphs
,
p
.
first
)
&&
(
this
+
p
.
second
).
intersects
(
glyphs
,
lookup_context
);
})
|
hb_any
;
}
...
...
@@ -2217,7 +2217,7 @@ struct ChainContextFormat2
return
+
hb_enumerate
(
ruleSet
)
|
hb_filter
([
&
]
(
unsigned
_
)
->
bool
|
hb_filter
([
&
]
(
unsigned
_
)
{
return
input_class_def
.
intersects_class
(
c
->
glyphs
,
_
);
},
hb_first
)
|
hb_map
(
hb_second
)
...
...
src/hb-ot-name-table.hh
浏览文件 @
78d35f0e
...
...
@@ -192,7 +192,7 @@ struct name
const
void
*
dst_string_pool
=
&
(
this
+
this
->
stringOffset
);
+
it
|
hb_apply
([
&
]
(
const
NameRecord
&
_
)
{
c
->
copy
(
_
,
src_string_pool
,
dst_string_pool
);
})
|
hb_apply
([
=
]
(
const
NameRecord
&
_
)
{
c
->
copy
(
_
,
src_string_pool
,
dst_string_pool
);
})
;
if
(
unlikely
(
c
->
ran_out_of_room
))
return_trace
(
false
);
...
...
src/hb-ot-stat-table.hh
浏览文件 @
78d35f0e
...
...
@@ -289,7 +289,7 @@ struct STAT
;
+
get_axis_value_offsets
()
|
hb_map
([
&
]
(
const
OffsetTo
<
AxisValue
>&
_
)
{
return
hb_addressof
(
this
+
_
);
})
|
hb_map
([
this
]
(
const
OffsetTo
<
AxisValue
>&
_
)
{
return
hb_addressof
(
this
+
_
);
})
|
hb_map
(
&
AxisValue
::
get_value_name_id
)
|
hb_sink
(
nameids_to_retain
)
;
...
...
src/hb-ot-var-fvar-table.hh
浏览文件 @
78d35f0e
...
...
@@ -290,12 +290,12 @@ struct fvar
;
+
hb_range
((
unsigned
)
instanceCount
)
|
hb_map
([
&
]
(
const
unsigned
_
)
{
return
get_instance_subfamily_name_id
(
_
);
})
|
hb_map
([
this
]
(
const
unsigned
_
)
{
return
get_instance_subfamily_name_id
(
_
);
})
|
hb_sink
(
nameids
)
;
+
hb_range
((
unsigned
)
instanceCount
)
|
hb_map
([
&
]
(
const
unsigned
_
)
{
return
get_instance_postscript_name_id
(
_
);
})
|
hb_map
([
this
]
(
const
unsigned
_
)
{
return
get_instance_postscript_name_id
(
_
);
})
|
hb_sink
(
nameids
)
;
}
...
...
src/hb-subset-plan.cc
浏览文件 @
78d35f0e
...
...
@@ -177,7 +177,7 @@ _create_old_gid_to_new_gid_map (const hb_face_t *face,
*
num_glyphs
=
reverse_glyph_map
->
get_population
();
}
else
{
+
hb_iter
(
all_gids_to_retain
)
|
hb_map
([
=
]
(
hb_codepoint_t
_
)
{
|
hb_map
([]
(
hb_codepoint_t
_
)
{
return
hb_pair_t
<
hb_codepoint_t
,
hb_codepoint_t
>
(
_
,
_
);
})
|
hb_sink
(
reverse_glyph_map
)
...
...
src/test-iter.cc
浏览文件 @
78d35f0e
...
...
@@ -203,8 +203,8 @@ main (int argc, char **argv)
;
+
hb_iter
(
src
)
|
hb_map
([
&
]
(
int
i
)
{
return
1
;
})
|
hb_reduce
([
&
]
(
int
acc
,
int
value
)
{
return
acc
;
},
2
)
|
hb_map
([]
(
int
i
)
{
return
1
;
})
|
hb_reduce
([
=
]
(
int
acc
,
int
value
)
{
return
acc
;
},
2
)
;
using
map_pair_t
=
hb_item_type
<
hb_map_t
>
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录