Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5c3112ae
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看板
提交
5c3112ae
编写于
5月 01, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
s/hb_prealloced_array_t/hb_vector_t/g
Part of
https://github.com/harfbuzz/harfbuzz/issues/1017
上级
4a01eb12
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
31 addition
and
31 deletion
+31
-31
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+3
-3
src/hb-ot-hmtx-table.hh
src/hb-ot-hmtx-table.hh
+1
-1
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+5
-5
src/hb-ot-os2-table.hh
src/hb-ot-os2-table.hh
+2
-2
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+1
-1
src/hb-private.hh
src/hb-private.hh
+3
-3
src/hb-set-private.hh
src/hb-set-private.hh
+2
-2
src/hb-subset-glyf.cc
src/hb-subset-glyf.cc
+6
-6
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+4
-4
src/hb-subset-plan.hh
src/hb-subset-plan.hh
+3
-3
src/hb-subset.cc
src/hb-subset.cc
+1
-1
未找到文件。
src/hb-ot-cmap-table.hh
浏览文件 @
5c3112ae
...
...
@@ -294,7 +294,7 @@ struct CmapSubtableLongSegmented
}
inline
bool
serialize
(
hb_serialize_context_t
*
c
,
hb_
prealloced_array
_t
<
CmapSubtableLongGroup
>
&
group_data
)
hb_
vector
_t
<
CmapSubtableLongGroup
>
&
group_data
)
{
TRACE_SERIALIZE
(
this
);
if
(
unlikely
(
!
c
->
extend_min
(
*
this
)))
return_trace
(
false
);
...
...
@@ -548,7 +548,7 @@ struct cmap
}
inline
bool
populate_groups
(
hb_subset_plan_t
*
plan
,
hb_
prealloced_array
_t
<
CmapSubtableLongGroup
>
*
groups
)
const
hb_
vector
_t
<
CmapSubtableLongGroup
>
*
groups
)
const
{
CmapSubtableLongGroup
*
group
=
nullptr
;
for
(
unsigned
int
i
=
0
;
i
<
plan
->
codepoints
.
len
;
i
++
)
{
...
...
@@ -582,7 +582,7 @@ struct cmap
return
true
;
}
inline
bool
_subset
(
hb_
prealloced_array
_t
<
CmapSubtableLongGroup
>
&
groups
,
inline
bool
_subset
(
hb_
vector
_t
<
CmapSubtableLongGroup
>
&
groups
,
size_t
dest_sz
,
void
*
dest
)
const
{
...
...
src/hb-ot-hmtx-table.hh
浏览文件 @
5c3112ae
...
...
@@ -94,7 +94,7 @@ struct hmtxvmtx
/* All the trailing glyphs with the same advance can use one LongMetric
* and just keep LSB */
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
gids
=
plan
->
gids_to_retain_sorted
;
hb_
vector
_t
<
hb_codepoint_t
>
&
gids
=
plan
->
gids_to_retain_sorted
;
unsigned
int
num_advances
=
gids
.
len
;
unsigned
int
last_advance
=
_mtx
.
get_advance
(
gids
[
num_advances
-
1
]);
while
(
num_advances
>
1
...
...
src/hb-ot-map-private.hh
浏览文件 @
5c3112ae
...
...
@@ -147,9 +147,9 @@ struct hb_ot_map_t
hb_mask_t
global_mask
;
hb_
prealloced_array
_t
<
feature_map_t
,
8
>
features
;
hb_
prealloced_array
_t
<
lookup_map_t
,
32
>
lookups
[
2
];
/* GSUB/GPOS */
hb_
prealloced_array
_t
<
stage_map_t
,
4
>
stages
[
2
];
/* GSUB/GPOS */
hb_
vector
_t
<
feature_map_t
,
8
>
features
;
hb_
vector
_t
<
lookup_map_t
,
32
>
lookups
[
2
];
/* GSUB/GPOS */
hb_
vector
_t
<
stage_map_t
,
4
>
stages
[
2
];
/* GSUB/GPOS */
};
enum
hb_ot_map_feature_flags_t
{
...
...
@@ -241,8 +241,8 @@ struct hb_ot_map_builder_t
private:
unsigned
int
current_stage
[
2
];
/* GSUB/GPOS */
hb_
prealloced_array
_t
<
feature_info_t
,
32
>
feature_infos
;
hb_
prealloced_array
_t
<
stage_info_t
,
8
>
stages
[
2
];
/* GSUB/GPOS */
hb_
vector
_t
<
feature_info_t
,
32
>
feature_infos
;
hb_
vector
_t
<
stage_info_t
,
8
>
stages
[
2
];
/* GSUB/GPOS */
};
...
...
src/hb-ot-os2-table.hh
浏览文件 @
5c3112ae
...
...
@@ -74,7 +74,7 @@ struct os2
return
result
;
}
inline
void
_update_unicode_ranges
(
const
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
codepoints
,
inline
void
_update_unicode_ranges
(
const
hb_
vector
_t
<
hb_codepoint_t
>
&
codepoints
,
HBUINT32
ulUnicodeRange
[
4
])
const
{
for
(
unsigned
int
i
=
0
;
i
<
4
;
i
++
)
...
...
@@ -101,7 +101,7 @@ struct os2
}
}
static
inline
void
find_min_and_max_codepoint
(
const
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
codepoints
,
static
inline
void
find_min_and_max_codepoint
(
const
hb_
vector
_t
<
hb_codepoint_t
>
&
codepoints
,
uint16_t
*
min_cp
,
/* OUT */
uint16_t
*
max_cp
/* OUT */
)
{
...
...
src/hb-ot-post-table.hh
浏览文件 @
5c3112ae
...
...
@@ -258,7 +258,7 @@ struct post
hb_blob_t
*
blob
;
uint32_t
version
;
const
ArrayOf
<
HBUINT16
>
*
glyphNameIndex
;
hb_
prealloced_array
_t
<
uint32_t
,
1
>
index_to_offset
;
hb_
vector
_t
<
uint32_t
,
1
>
index_to_offset
;
const
uint8_t
*
pool
;
mutable
uint16_t
*
gids_sorted_by_name
;
};
...
...
src/hb-private.hh
浏览文件 @
5c3112ae
...
...
@@ -527,7 +527,7 @@ _hb_ceil_to_4 (unsigned int v)
#define HB_PREALLOCED_ARRAY_INIT {0, 0, nullptr}
template
<
typename
Type
,
unsigned
int
StaticSize
=
16
>
struct
hb_
prealloced_array
_t
struct
hb_
vector
_t
{
unsigned
int
len
;
unsigned
int
allocated
;
...
...
@@ -710,14 +710,14 @@ struct hb_auto_t : Type
void
fini
(
void
)
{}
};
template
<
typename
Type
>
struct
hb_auto_array_t
:
hb_auto_t
<
hb_
prealloced_array
_t
<
Type
>
>
{};
struct
hb_auto_array_t
:
hb_auto_t
<
hb_
vector
_t
<
Type
>
>
{};
#define HB_LOCKABLE_SET_INIT {HB_PREALLOCED_ARRAY_INIT}
template
<
typename
item_t
,
typename
lock_t
>
struct
hb_lockable_set_t
{
hb_
prealloced_array
_t
<
item_t
,
1
>
items
;
hb_
vector
_t
<
item_t
,
1
>
items
;
inline
void
init
(
void
)
{
items
.
init
();
}
...
...
src/hb-set-private.hh
浏览文件 @
5c3112ae
...
...
@@ -190,8 +190,8 @@ struct hb_set_t
ASSERT_POD
();
bool
in_error
;
mutable
unsigned
int
population
;
hb_
prealloced_array
_t
<
page_map_t
,
8
>
page_map
;
hb_
prealloced_array
_t
<
page_t
,
1
>
pages
;
hb_
vector
_t
<
page_map_t
,
8
>
page_map
;
hb_
vector
_t
<
page_t
,
1
>
pages
;
inline
void
init
(
void
)
{
...
...
src/hb-subset-glyf.cc
浏览文件 @
5c3112ae
...
...
@@ -32,12 +32,12 @@
static
bool
_calculate_glyf_and_loca_prime_size
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
glyph_ids
,
hb_
vector
_t
<
hb_codepoint_t
>
&
glyph_ids
,
hb_bool_t
drop_hints
,
bool
*
use_short_loca
/* OUT */
,
unsigned
int
*
glyf_size
/* OUT */
,
unsigned
int
*
loca_size
/* OUT */
,
hb_
prealloced_array
_t
<
unsigned
int
>
*
instruction_ranges
/* OUT */
)
hb_
vector
_t
<
unsigned
int
>
*
instruction_ranges
/* OUT */
)
{
unsigned
int
total
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
glyph_ids
.
len
;
i
++
)
...
...
@@ -159,13 +159,13 @@ _write_glyf_and_loca_prime (hb_subset_plan_t *plan,
const
OT
::
glyf
::
accelerator_t
&
glyf
,
const
char
*
glyf_data
,
bool
use_short_loca
,
hb_
prealloced_array
_t
<
unsigned
int
>
&
instruction_ranges
,
hb_
vector
_t
<
unsigned
int
>
&
instruction_ranges
,
unsigned
int
glyf_prime_size
,
char
*
glyf_prime_data
/* OUT */
,
unsigned
int
loca_prime_size
,
char
*
loca_prime_data
/* OUT */
)
{
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
glyph_ids
=
plan
->
gids_to_retain_sorted
;
hb_
vector
_t
<
hb_codepoint_t
>
&
glyph_ids
=
plan
->
gids_to_retain_sorted
;
char
*
glyf_prime_data_next
=
glyf_prime_data
;
bool
success
=
true
;
...
...
@@ -234,11 +234,11 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf,
hb_blob_t
**
loca_prime
/* OUT */
)
{
// TODO(grieger): Sanity check allocation size for the new table.
hb_
prealloced_array
_t
<
hb_codepoint_t
>
&
glyphs_to_retain
=
plan
->
gids_to_retain_sorted
;
hb_
vector
_t
<
hb_codepoint_t
>
&
glyphs_to_retain
=
plan
->
gids_to_retain_sorted
;
unsigned
int
glyf_prime_size
;
unsigned
int
loca_prime_size
;
hb_
prealloced_array
_t
<
unsigned
int
>
instruction_ranges
;
hb_
vector
_t
<
unsigned
int
>
instruction_ranges
;
instruction_ranges
.
init
();
if
(
unlikely
(
!
_calculate_glyf_and_loca_prime_size
(
glyf
,
...
...
src/hb-subset-plan.cc
浏览文件 @
5c3112ae
...
...
@@ -87,7 +87,7 @@ hb_subset_plan_add_table (hb_subset_plan_t *plan,
static
void
_populate_codepoints
(
hb_set_t
*
input_codepoints
,
hb_
prealloced_array
_t
<
hb_codepoint_t
>&
plan_codepoints
)
hb_
vector
_t
<
hb_codepoint_t
>&
plan_codepoints
)
{
plan_codepoints
.
alloc
(
hb_set_get_population
(
input_codepoints
));
hb_codepoint_t
cp
=
-
1
;
...
...
@@ -121,9 +121,9 @@ _add_gid_and_children (const OT::glyf::accelerator_t &glyf,
static
void
_populate_gids_to_retain
(
hb_face_t
*
face
,
hb_
prealloced_array
_t
<
hb_codepoint_t
>&
codepoints
,
hb_
prealloced_array
_t
<
hb_codepoint_t
>&
old_gids
,
hb_
prealloced_array
_t
<
hb_codepoint_t
>&
old_gids_sorted
)
hb_
vector
_t
<
hb_codepoint_t
>&
codepoints
,
hb_
vector
_t
<
hb_codepoint_t
>&
old_gids
,
hb_
vector
_t
<
hb_codepoint_t
>&
old_gids_sorted
)
{
OT
::
cmap
::
accelerator_t
cmap
;
OT
::
glyf
::
accelerator_t
glyf
;
...
...
src/hb-subset-plan.hh
浏览文件 @
5c3112ae
...
...
@@ -45,12 +45,12 @@ struct hb_subset_plan_t {
// These first two lists provide a mapping from cp -> gid
// As a result it does not list the full set of glyphs to retain.
hb_
prealloced_array
_t
<
hb_codepoint_t
>
codepoints
;
hb_
prealloced_array
_t
<
hb_codepoint_t
>
gids_to_retain
;
hb_
vector
_t
<
hb_codepoint_t
>
codepoints
;
hb_
vector
_t
<
hb_codepoint_t
>
gids_to_retain
;
// This list contains the complete set of glyphs to retain and may contain
// more glyphs then the lists above.
hb_
prealloced_array
_t
<
hb_codepoint_t
>
gids_to_retain_sorted
;
hb_
vector
_t
<
hb_codepoint_t
>
gids_to_retain_sorted
;
// Plan is only good for a specific source/dest so keep them with it
hb_face_t
*
source
;
...
...
src/hb-subset.cc
浏览文件 @
5c3112ae
...
...
@@ -123,7 +123,7 @@ struct hb_subset_face_data_t
hb_blob_t
*
blob
;
};
hb_
prealloced_array
_t
<
table_entry_t
,
32
>
tables
;
hb_
vector
_t
<
table_entry_t
,
32
>
tables
;
};
static
hb_subset_face_data_t
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录