summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc
index afb23ae3c02..e89ca695114 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc
@@ -330,18 +330,15 @@ struct cff2_subset_plan {
{
subset_localsubrs[fd].init ();
offsets.localSubrsInfos[fd].init ();
- if (fdmap.includes (fd))
- {
- if (!subr_subsetter.encode_localsubrs (fd, subset_localsubrs[fd]))
- return false;
-
- unsigned int dataSize = subset_localsubrs[fd].total_size ();
- if (dataSize > 0)
- {
- offsets.localSubrsInfos[fd].offset = final_size;
- offsets.localSubrsInfos[fd].offSize = calcOffSize (dataSize);
- offsets.localSubrsInfos[fd].size = CFF2Subrs::calculate_serialized_size (offsets.localSubrsInfos[fd].offSize, subset_localsubrs[fd].length, dataSize);
- }
+ if (!subr_subsetter.encode_localsubrs (fd, subset_localsubrs[fd]))
+ return false;
+
+ unsigned int dataSize = subset_localsubrs[fd].total_size ();
+ if (dataSize > 0)
+ {
+ offsets.localSubrsInfos[fd].offset = final_size;
+ offsets.localSubrsInfos[fd].offSize = calcOffSize (dataSize);
+ offsets.localSubrsInfos[fd].size = CFF2Subrs::calculate_serialized_size (offsets.localSubrsInfos[fd].offSize, subset_localsubrs[fd].length, dataSize);
}
}
}
@@ -382,7 +379,7 @@ struct cff2_subset_plan {
cff_font_dict_op_serializer_t fontSzr;
unsigned int dictsSize = 0;
for (unsigned int i = 0; i < acc.fontDicts.length; i++)
- if (fdmap.includes (i))
+ if (fdmap.has (i))
dictsSize += FontDict::calculate_serialized_size (acc.fontDicts[i], fontSzr);
offsets.FDArrayInfo.offSize = calcOffSize (dictsSize);
@@ -401,7 +398,7 @@ struct cff2_subset_plan {
offsets.privateDictsOffset = final_size;
for (unsigned int i = 0; i < orig_fdcount; i++)
{
- if (fdmap.includes (i))
+ if (fdmap.has (i))
{
bool has_localsubrs = offsets.localSubrsInfos[i].size > 0;
cff_private_dict_op_serializer_t privSzr (desubroutinize, drop_hints);
@@ -431,7 +428,7 @@ struct cff2_subset_plan {
unsigned int subset_fdselect_format;
hb_vector_t<code_pair_t> subset_fdselect_ranges;
- remap_t fdmap;
+ hb_inc_bimap_t fdmap;
str_buff_vec_t subset_charstrings;
str_buff_vec_t subset_globalsubrs;
@@ -541,7 +538,7 @@ static inline bool _write_cff2 (const cff2_subset_plan &plan,
assert (plan.offsets.privateDictsOffset == (unsigned) (c.head - c.start));
for (unsigned int i = 0; i < acc.privateDicts.length; i++)
{
- if (plan.fdmap.includes (i))
+ if (plan.fdmap.has (i))
{
PrivateDict *pd = c.start_embed<PrivateDict> ();
if (unlikely (pd == nullptr)) return false;