Coverage Report

Created: 2025-06-24 08:20

/src/skia/third_party/externals/harfbuzz/src/hb-ot-layout-common.hh
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright © 2007,2008,2009  Red Hat, Inc.
3
 * Copyright © 2010,2012  Google, Inc.
4
 *
5
 *  This is part of HarfBuzz, a text shaping library.
6
 *
7
 * Permission is hereby granted, without written agreement and without
8
 * license or royalty fees, to use, copy, modify, and distribute this
9
 * software and its documentation for any purpose, provided that the
10
 * above copyright notice and the following two paragraphs appear in
11
 * all copies of this software.
12
 *
13
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17
 * DAMAGE.
18
 *
19
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
22
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24
 *
25
 * Red Hat Author(s): Behdad Esfahbod
26
 * Google Author(s): Behdad Esfahbod
27
 */
28
29
#ifndef HB_OT_LAYOUT_COMMON_HH
30
#define HB_OT_LAYOUT_COMMON_HH
31
32
#include "hb.hh"
33
#include "hb-ot-layout.hh"
34
#include "hb-open-type.hh"
35
#include "hb-set.hh"
36
#include "hb-bimap.hh"
37
#include "hb-cache.hh"
38
39
#include "OT/Layout/Common/Coverage.hh"
40
#include "OT/Layout/types.hh"
41
42
// TODO(garretrieger): cleanup these after migration.
43
using OT::Layout::Common::Coverage;
44
using OT::Layout::Common::RangeRecord;
45
using OT::Layout::SmallTypes;
46
using OT::Layout::MediumTypes;
47
48
49
namespace OT {
50
51
template<typename Iterator>
52
static inline bool ClassDef_serialize (hb_serialize_context_t *c,
53
               Iterator it);
54
55
static bool ClassDef_remap_and_serialize (
56
    hb_serialize_context_t *c,
57
    const hb_set_t &klasses,
58
    bool use_class_zero,
59
    hb_sorted_vector_t<hb_codepoint_pair_t> &glyph_and_klass, /* IN/OUT */
60
    hb_map_t *klass_map /*IN/OUT*/);
61
62
struct hb_collect_feature_substitutes_with_var_context_t
63
{
64
  const hb_map_t *axes_index_tag_map;
65
  const hb_hashmap_t<hb_tag_t, Triple> *axes_location;
66
  hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *record_cond_idx_map;
67
  hb_hashmap_t<unsigned, const Feature*> *feature_substitutes_map;
68
  hb_set_t& catch_all_record_feature_idxes;
69
70
  // not stored in subset_plan
71
  hb_set_t *feature_indices;
72
  bool apply;
73
  bool variation_applied;
74
  bool universal;
75
  unsigned cur_record_idx;
76
  hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned> *conditionset_map;
77
};
78
79
struct hb_prune_langsys_context_t
80
{
81
  hb_prune_langsys_context_t (const void         *table_,
82
                              hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *script_langsys_map_,
83
                              const hb_map_t     *duplicate_feature_map_,
84
                              hb_set_t           *new_collected_feature_indexes_)
85
0
      :table (table_),
86
0
      script_langsys_map (script_langsys_map_),
87
0
      duplicate_feature_map (duplicate_feature_map_),
88
0
      new_feature_indexes (new_collected_feature_indexes_),
89
0
      script_count (0),langsys_feature_count (0) {}
90
91
  bool visitScript ()
92
0
  { return script_count++ < HB_MAX_SCRIPTS; }
Unexecuted instantiation: OT::hb_prune_langsys_context_t::visitScript()
Unexecuted instantiation: OT::hb_prune_langsys_context_t::visitScript()
93
94
  bool visitLangsys (unsigned feature_count)
95
0
  {
96
0
    langsys_feature_count += feature_count;
97
0
    return langsys_feature_count < HB_MAX_LANGSYS_FEATURE_COUNT;
98
0
  }
Unexecuted instantiation: OT::hb_prune_langsys_context_t::visitLangsys(unsigned int)
Unexecuted instantiation: OT::hb_prune_langsys_context_t::visitLangsys(unsigned int)
99
100
  public:
101
  const void *table;
102
  hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *script_langsys_map;
103
  const hb_map_t     *duplicate_feature_map;
104
  hb_set_t           *new_feature_indexes;
105
106
  private:
107
  unsigned script_count;
108
  unsigned langsys_feature_count;
109
};
110
111
struct hb_subset_layout_context_t :
112
  hb_dispatch_context_t<hb_subset_layout_context_t, hb_empty_t, HB_DEBUG_SUBSET>
113
{
114
0
  const char *get_name () { return "SUBSET_LAYOUT"; }
115
0
  static return_t default_return_value () { return hb_empty_t (); }
116
117
  bool visitScript ()
118
0
  {
119
0
    return script_count++ < HB_MAX_SCRIPTS;
120
0
  }
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitScript()
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitScript()
121
122
  bool visitLangSys ()
123
0
  {
124
0
    return langsys_count++ < HB_MAX_LANGSYS;
125
0
  }
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitLangSys()
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitLangSys()
126
127
  bool visitFeatureIndex (int count)
128
0
  {
129
0
    feature_index_count += count;
130
0
    return feature_index_count < HB_MAX_FEATURE_INDICES;
131
0
  }
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitFeatureIndex(int)
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitFeatureIndex(int)
132
133
  bool visitLookupIndex()
134
0
  {
135
0
    lookup_index_count++;
136
0
    return lookup_index_count < HB_MAX_LOOKUP_VISIT_COUNT;
137
0
  }
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitLookupIndex()
Unexecuted instantiation: OT::hb_subset_layout_context_t::visitLookupIndex()
138
139
  hb_subset_context_t *subset_context;
140
  const hb_tag_t table_tag;
141
  const hb_map_t *lookup_index_map;
142
  const hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *script_langsys_map;
143
  const hb_map_t *feature_index_map;
144
  const hb_hashmap_t<unsigned, const Feature*> *feature_substitutes_map;
145
  hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map;
146
  const hb_set_t *catch_all_record_feature_idxes;
147
  const hb_hashmap_t<unsigned, hb_pair_t<const void*, const void*>> *feature_idx_tag_map;
148
149
  unsigned cur_script_index;
150
  unsigned cur_feature_var_record_idx;
151
152
  hb_subset_layout_context_t (hb_subset_context_t *c_,
153
            hb_tag_t tag_) :
154
0
        subset_context (c_),
155
0
        table_tag (tag_),
156
0
        cur_script_index (0xFFFFu),
157
0
        cur_feature_var_record_idx (0u),
158
0
        script_count (0),
159
0
        langsys_count (0),
160
0
        feature_index_count (0),
161
0
        lookup_index_count (0)
162
0
  {
163
0
    if (tag_ == HB_OT_TAG_GSUB)
164
0
    {
165
0
      lookup_index_map = &c_->plan->gsub_lookups;
166
0
      script_langsys_map = &c_->plan->gsub_langsys;
167
0
      feature_index_map = &c_->plan->gsub_features;
168
0
      feature_substitutes_map = &c_->plan->gsub_feature_substitutes_map;
169
0
      feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gsub_feature_record_cond_idx_map;
170
0
      catch_all_record_feature_idxes = &c_->plan->gsub_old_features;
171
0
      feature_idx_tag_map = &c_->plan->gsub_old_feature_idx_tag_map;
172
0
    }
173
0
    else
174
0
    {
175
0
      lookup_index_map = &c_->plan->gpos_lookups;
176
0
      script_langsys_map = &c_->plan->gpos_langsys;
177
0
      feature_index_map = &c_->plan->gpos_features;
178
0
      feature_substitutes_map = &c_->plan->gpos_feature_substitutes_map;
179
0
      feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gpos_feature_record_cond_idx_map;
180
0
      catch_all_record_feature_idxes = &c_->plan->gpos_old_features;
181
0
      feature_idx_tag_map = &c_->plan->gpos_old_feature_idx_tag_map;
182
0
    }
183
0
  }
184
185
  private:
186
  unsigned script_count;
187
  unsigned langsys_count;
188
  unsigned feature_index_count;
189
  unsigned lookup_index_count;
190
};
191
192
struct ItemVariationStore;
193
struct hb_collect_variation_indices_context_t :
194
       hb_dispatch_context_t<hb_collect_variation_indices_context_t>
195
{
196
  template <typename T>
197
0
  return_t dispatch (const T &obj) { obj.collect_variation_indices (this); return hb_empty_t (); }
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::SinglePosFormat1>(OT::Layout::GPOS_impl::SinglePosFormat1 const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::SinglePosFormat2>(OT::Layout::GPOS_impl::SinglePosFormat2 const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::PairPosFormat1_3<OT::Layout::SmallTypes> >(OT::Layout::GPOS_impl::PairPosFormat1_3<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::PairPosFormat2_4<OT::Layout::SmallTypes> >(OT::Layout::GPOS_impl::PairPosFormat2_4<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::CursivePosFormat1>(OT::Layout::GPOS_impl::CursivePosFormat1 const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::MarkBasePosFormat1_2<OT::Layout::SmallTypes> >(OT::Layout::GPOS_impl::MarkBasePosFormat1_2<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::MarkLigPosFormat1_2<OT::Layout::SmallTypes> >(OT::Layout::GPOS_impl::MarkLigPosFormat1_2<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::Layout::GPOS_impl::MarkMarkPosFormat1_2<OT::Layout::SmallTypes> >(OT::Layout::GPOS_impl::MarkMarkPosFormat1_2<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ContextFormat1_4<OT::Layout::SmallTypes> >(OT::ContextFormat1_4<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ContextFormat2_5<OT::Layout::SmallTypes> >(OT::ContextFormat2_5<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ContextFormat3>(OT::ContextFormat3 const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ChainContextFormat1_4<OT::Layout::SmallTypes> >(OT::ChainContextFormat1_4<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ChainContextFormat2_5<OT::Layout::SmallTypes> >(OT::ChainContextFormat2_5<OT::Layout::SmallTypes> const&)
Unexecuted instantiation: hb_empty_t OT::hb_collect_variation_indices_context_t::dispatch<OT::ChainContextFormat3>(OT::ChainContextFormat3 const&)
198
0
  static return_t default_return_value () { return hb_empty_t (); }
199
200
  hb_set_t *layout_variation_indices;
201
  const hb_set_t *glyph_set;
202
  const hb_map_t *gpos_lookups;
203
204
  hb_collect_variation_indices_context_t (hb_set_t *layout_variation_indices_,
205
            const hb_set_t *glyph_set_,
206
            const hb_map_t *gpos_lookups_) :
207
0
          layout_variation_indices (layout_variation_indices_),
208
0
          glyph_set (glyph_set_),
209
0
          gpos_lookups (gpos_lookups_) {}
210
};
211
212
template<typename OutputArray>
213
struct subset_offset_array_t
214
{
215
  subset_offset_array_t (hb_subset_context_t *subset_context_,
216
       OutputArray& out_,
217
0
       const void *base_) : subset_context (subset_context_),
218
0
                out (out_), base (base_) {}
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >::subset_offset_array_t(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*)
219
220
  template <typename T>
221
  bool operator () (T&& offset)
222
0
  {
223
0
    auto snap = subset_context->serializer->snapshot ();
224
0
    auto *o = out.serialize_append (subset_context->serializer);
225
0
    if (unlikely (!o)) return false;
226
0
    bool ret = o->serialize_subset (subset_context, offset, base);
227
0
    if (!ret)
228
0
    {
229
0
      out.pop ();
230
0
      subset_context->serializer->revert (snap);
231
0
    }
232
0
    return ret;
233
0
  }
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true> const&>(OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true> const&>(OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >::operator()<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true> const&)
234
235
  private:
236
  hb_subset_context_t *subset_context;
237
  OutputArray &out;
238
  const void *base;
239
};
240
241
242
template<typename OutputArray, typename Arg>
243
struct subset_offset_array_arg_t
244
{
245
  subset_offset_array_arg_t (hb_subset_context_t *subset_context_,
246
           OutputArray& out_,
247
           const void *base_,
248
0
           Arg &&arg_) : subset_context (subset_context_), out (out_),
249
0
            base (base_), arg (arg_) {}
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&)
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&)
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&)
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&)
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&)
Unexecuted instantiation: OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::subset_offset_array_arg_t(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&)
250
251
  template <typename T>
252
  bool operator () (T&& offset)
253
0
  {
254
0
    auto snap = subset_context->serializer->snapshot ();
255
0
    auto *o = out.serialize_append (subset_context->serializer);
256
0
    if (unlikely (!o)) return false;
257
0
    bool ret = o->serialize_subset (subset_context, offset, base, arg);
258
0
    if (!ret)
259
0
    {
260
0
      out.pop ();
261
0
      subset_context->serializer->revert (snap);
262
0
    }
263
0
    return ret;
264
0
  }
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::operator()<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::operator()<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::operator()<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>::operator()<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
Unexecuted instantiation: bool OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>::operator()<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&>(OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true> const&)
265
266
  private:
267
  hb_subset_context_t *subset_context;
268
  OutputArray &out;
269
  const void *base;
270
  Arg &&arg;
271
};
272
273
/*
274
 * Helper to subset an array of offsets. Subsets the thing pointed to by each offset
275
 * and discards the offset in the array if the subset operation results in an empty
276
 * thing.
277
 */
278
struct
279
{
280
  template<typename OutputArray>
281
  subset_offset_array_t<OutputArray>
282
  operator () (hb_subset_context_t *subset_context, OutputArray& out,
283
         const void *base) const
284
0
  { return subset_offset_array_t<OutputArray> (subset_context, out, base); }
Unexecuted instantiation: hb-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_45::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-font.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_42::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_42::operator()<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::AttachPoint, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::CaretValue, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::LigGlyph, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Sequence<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::AlternateSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_t<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Condition, OT::IntType<unsigned int, 4u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_offset_array_t<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > >(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::BaseCoord, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*) const
285
286
  /* Variant with one extra argument passed to serialize_subset */
287
  template<typename OutputArray, typename Arg>
288
  subset_offset_array_arg_t<OutputArray, Arg>
289
  operator () (hb_subset_context_t *subset_context, OutputArray& out,
290
         const void *base, Arg &&arg) const
291
0
  { return subset_offset_array_arg_t<OutputArray, Arg> (subset_context, out, base, arg); }
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_41::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_45::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::RuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, hb_map_t const*&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::ChainRuleSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, hb_map_t const*&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::LigatureSet<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_offset_array_arg_t<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&> OT::$_40::operator()<OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >, unsigned int&>(hb_subset_context_t*, OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::Ligature<OT::Layout::SmallTypes>, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >&, void const*, unsigned int&) const
292
}
293
HB_FUNCOBJ (subset_offset_array);
294
295
template<typename OutputArray>
296
struct subset_record_array_t
297
{
298
  subset_record_array_t (hb_subset_layout_context_t *c_, OutputArray* out_,
299
0
       const void *base_) : subset_layout_context (c_),
300
0
                out (out_), base (base_) {}
Unexecuted instantiation: OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> >::subset_record_array_t(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*)
Unexecuted instantiation: OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >::subset_record_array_t(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*)
Unexecuted instantiation: OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >::subset_record_array_t(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*)
301
302
  template <typename T>
303
  void
304
  operator () (T&& record)
305
0
  {
306
0
    auto snap = subset_layout_context->subset_context->serializer->snapshot ();
307
0
    bool ret = record.subset (subset_layout_context, base);
308
0
    if (!ret) subset_layout_context->subset_context->serializer->revert (snap);
309
0
    else out->len++;
310
0
  }
Unexecuted instantiation: void OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> >::operator()<OT::Record<OT::LangSys> const&>(OT::Record<OT::LangSys> const&)
Unexecuted instantiation: void OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >::operator()<OT::FeatureTableSubstitutionRecord const&>(OT::FeatureTableSubstitutionRecord const&)
Unexecuted instantiation: void OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >::operator()<OT::FeatureVariationRecord const&>(OT::FeatureVariationRecord const&)
311
312
  private:
313
  hb_subset_layout_context_t *subset_layout_context;
314
  OutputArray *out;
315
  const void *base;
316
};
317
318
template<typename OutputArray, typename Arg>
319
struct subset_record_array_arg_t
320
{
321
  subset_record_array_arg_t (hb_subset_layout_context_t *c_, OutputArray* out_,
322
           const void *base_,
323
0
           Arg &&arg_) : subset_layout_context (c_),
324
0
             out (out_), base (base_), arg (arg_) {}
Unexecuted instantiation: OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&>::subset_record_array_arg_t(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&)
Unexecuted instantiation: OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>::subset_record_array_arg_t(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&)
325
326
  template <typename T>
327
  void
328
  operator () (T&& record)
329
0
  {
330
0
    auto snap = subset_layout_context->subset_context->serializer->snapshot ();
331
0
    bool ret = record.subset (subset_layout_context, base, arg);
332
0
    if (!ret) subset_layout_context->subset_context->serializer->revert (snap);
333
0
    else out->len++;
334
0
  }
Unexecuted instantiation: void OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&>::operator()<OT::Record<OT::Feature> const&>(OT::Record<OT::Feature> const&)
Unexecuted instantiation: void OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>::operator()<OT::FeatureVariationRecord const&>(OT::FeatureVariationRecord const&)
335
336
  private:
337
  hb_subset_layout_context_t *subset_layout_context;
338
  OutputArray *out;
339
  const void *base;
340
  Arg &&arg;
341
};
342
343
/*
344
 * Helper to subset a RecordList/record array. Subsets each Record in the array and
345
 * discards the record if the subset operation returns false.
346
 */
347
struct
348
{
349
  template<typename OutputArray>
350
  subset_record_array_t<OutputArray>
351
  operator () (hb_subset_layout_context_t *c, OutputArray* out,
352
         const void *base) const
353
0
  { return subset_record_array_t<OutputArray> (c, out, base); }
Unexecuted instantiation: hb-face.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_39::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-face.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_39::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-face.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_39::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-static.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_43::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_43::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_43::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-font.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-font.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-font.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_38::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_40::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_40::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_40::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_record_array_t<OT::RecordArrayOf<OT::LangSys> > OT::$_37::operator()<OT::RecordArrayOf<OT::LangSys> >(OT::hb_subset_layout_context_t*, OT::RecordArrayOf<OT::LangSys>*, void const*) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureTableSubstitutionRecord, OT::IntType<unsigned short, 2u> >*, void const*) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_record_array_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > > OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> > >(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*) const
354
355
  /* Variant with one extra argument passed to subset */
356
  template<typename OutputArray, typename Arg>
357
  subset_record_array_arg_t<OutputArray, Arg>
358
  operator () (hb_subset_layout_context_t *c, OutputArray* out,
359
               const void *base, Arg &&arg) const
360
0
  { return subset_record_array_arg_t<OutputArray, Arg> (c, out, base, arg); }
Unexecuted instantiation: hb-face.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_39::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-face.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_39::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-face.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-shape.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-static.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-static.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_43::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_43::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: gsubgpos-context.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-aat-layout.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-aat-map.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-font.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-font.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-font.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-layout.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-metrics.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-var.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-cff1.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_38::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-cff2.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_38::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_40::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-plan.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_40::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-cff-common.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_record_array_arg_t<OT::RecordListOfFeature, OT::Feature const*&> OT::$_37::operator()<OT::RecordListOfFeature, OT::Feature const*&>(OT::hb_subset_layout_context_t*, OT::RecordListOfFeature*, void const*, OT::Feature const*&) const
Unexecuted instantiation: hb-subset-plan-var.cc:OT::subset_record_array_arg_t<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&> OT::$_37::operator()<OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >, bool&>(OT::hb_subset_layout_context_t*, OT::ArrayOf<OT::FeatureVariationRecord, OT::IntType<unsigned int, 4u> >*, void const*, bool&) const
361
}
362
HB_FUNCOBJ (subset_record_array);
363
364
365
template<typename OutputArray>
366
struct serialize_math_record_array_t
367
{
368
  serialize_math_record_array_t (hb_serialize_context_t *serialize_context_,
369
                         OutputArray& out_,
370
0
                         const void *base_) : serialize_context (serialize_context_),
371
0
                                              out (out_), base (base_) {}
Unexecuted instantiation: OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > >::serialize_math_record_array_t(hb_serialize_context_t*, OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> >&, void const*)
Unexecuted instantiation: OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > >::serialize_math_record_array_t(hb_serialize_context_t*, OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> >&, void const*)
372
373
  template <typename T>
374
  bool operator () (T&& record)
375
0
  {
376
0
    if (!serialize_context->copy (record, base)) return false;
377
0
    out.len++;
378
0
    return true;
379
0
  }
Unexecuted instantiation: bool OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > >::operator()<OT::MathValueRecord const&>(OT::MathValueRecord const&)
Unexecuted instantiation: bool OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > >::operator()<OT::MathKernInfoRecord const&>(OT::MathKernInfoRecord const&)
380
381
  private:
382
  hb_serialize_context_t *serialize_context;
383
  OutputArray &out;
384
  const void *base;
385
};
386
387
/*
388
 * Helper to serialize an array of MATH records.
389
 */
390
struct
391
{
392
  template<typename OutputArray>
393
  serialize_math_record_array_t<OutputArray>
394
  operator () (hb_serialize_context_t *serialize_context, OutputArray& out,
395
               const void *base) const
396
0
  { return serialize_math_record_array_t<OutputArray> (serialize_context, out, base); }
Unexecuted instantiation: hb-subset.cc:OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > > OT::$_48::operator()<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > >(hb_serialize_context_t*, OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset.cc:OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > > OT::$_48::operator()<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > >(hb_serialize_context_t*, OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > > OT::$_44::operator()<OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> > >(hb_serialize_context_t*, OT::ArrayOf<OT::MathValueRecord, OT::IntType<unsigned short, 2u> >&, void const*) const
Unexecuted instantiation: hb-subset-plan.cc:OT::serialize_math_record_array_t<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > > OT::$_44::operator()<OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> > >(hb_serialize_context_t*, OT::ArrayOf<OT::MathKernInfoRecord, OT::IntType<unsigned short, 2u> >&, void const*) const
397
398
}
399
HB_FUNCOBJ (serialize_math_record_array);
400
401
/*
402
 *
403
 * OpenType Layout Common Table Formats
404
 *
405
 */
406
407
408
/*
409
 * Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
410
 */
411
412
struct IndexArray : Array16Of<Index>
413
{
414
  bool intersects (const hb_map_t *indexes) const
415
0
  { return hb_any (*this, indexes); }
416
417
  template <typename Iterator,
418
      hb_requires (hb_is_iterator (Iterator))>
419
  void serialize (hb_serialize_context_t *c,
420
      hb_subset_layout_context_t *l,
421
      Iterator it)
422
0
  {
423
0
    if (!it) return;
424
0
    if (unlikely (!c->extend_min ((*this)))) return;
425
426
0
    for (const auto _ : it)
427
0
    {
428
0
      if (!l->visitLookupIndex()) break;
429
430
0
      Index i;
431
0
      i = _;
432
0
      c->copy (i);
433
0
      this->len++;
434
0
    }
435
0
  }
Unexecuted instantiation: hb-face.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-face.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-shape.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-static.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_5LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-aat-map.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-font.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-font.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-metrics.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-var.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-cff1.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-cff2.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-plan.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_5LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-cff1-table.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-ot-cff2-table.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-cff-common.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-plan-layout.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_5LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
Unexecuted instantiation: hb-subset-plan-var.cc:_ZN2OT10IndexArray9serializeI13hb_map_iter_tI16hb_filter_iter_tI10hb_array_tIKNS_5IndexEERPK8hb_map_tRK3$_6LPv0EESB_L24hb_function_sortedness_t0ELSF_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSK_6item_tEEE5valueEvE4typeELSF_0EEEvP22hb_serialize_context_tPNS_26hb_subset_layout_context_tESK_
436
437
  unsigned int get_indexes (unsigned int start_offset,
438
          unsigned int *_count /* IN/OUT */,
439
          unsigned int *_indexes /* OUT */) const
440
0
  {
441
0
    if (_count)
442
0
    {
443
0
      + this->as_array ().sub_array (start_offset, _count)
444
0
      | hb_sink (hb_array (_indexes, *_count))
445
0
      ;
446
0
    }
447
0
    return this->len;
448
0
  }
449
450
  void add_indexes_to (hb_set_t* output /* OUT */) const
451
0
  {
452
0
    output->add_array (as_array ());
453
0
  }
454
};
455
456
457
/* https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#size */
458
struct FeatureParamsSize
459
{
460
  bool sanitize (hb_sanitize_context_t *c) const
461
0
  {
462
0
    TRACE_SANITIZE (this);
463
0
    if (unlikely (!c->check_struct (this))) return_trace (false);
464
0
    hb_barrier ();
465
466
    /* This subtable has some "history", if you will.  Some earlier versions of
467
     * Adobe tools calculated the offset of the FeatureParams subtable from the
468
     * beginning of the FeatureList table!  Now, that is dealt with in the
469
     * Feature implementation.  But we still need to be able to tell junk from
470
     * real data.  Note: We don't check that the nameID actually exists.
471
     *
472
     * Read Roberts wrote on 9/15/06 on opentype-list@indx.co.uk :
473
     *
474
     * Yes, it is correct that a new version of the AFDKO (version 2.0) will be
475
     * coming out soon, and that the makeotf program will build a font with a
476
     * 'size' feature that is correct by the specification.
477
     *
478
     * The specification for this feature tag is in the "OpenType Layout Tag
479
     * Registry". You can see a copy of this at:
480
     * https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-size
481
     *
482
     * Here is one set of rules to determine if the 'size' feature is built
483
     * correctly, or as by the older versions of MakeOTF. You may be able to do
484
     * better.
485
     *
486
     * Assume that the offset to the size feature is according to specification,
487
     * and make the following value checks. If it fails, assume the size
488
     * feature is calculated as versions of MakeOTF before the AFDKO 2.0 built it.
489
     * If this fails, reject the 'size' feature. The older makeOTF's calculated the
490
     * offset from the beginning of the FeatureList table, rather than from the
491
     * beginning of the 'size' Feature table.
492
     *
493
     * If "design size" == 0:
494
     *     fails check
495
     *
496
     * Else if ("subfamily identifier" == 0 and
497
     *     "range start" == 0 and
498
     *     "range end" == 0 and
499
     *     "range start" == 0 and
500
     *     "menu name ID" == 0)
501
     *     passes check: this is the format used when there is a design size
502
     * specified, but there is no recommended size range.
503
     *
504
     * Else if ("design size" <  "range start" or
505
     *     "design size" >   "range end" or
506
     *     "range end" <= "range start" or
507
     *     "menu name ID"  < 256 or
508
     *     "menu name ID"  > 32767 or
509
     *     menu name ID is not a name ID which is actually in the name table)
510
     *     fails test
511
     * Else
512
     *     passes test.
513
     */
514
515
0
    if (!designSize)
516
0
      return_trace (false);
517
0
    else if (subfamilyID == 0 &&
518
0
       subfamilyNameID == 0 &&
519
0
       rangeStart == 0 &&
520
0
       rangeEnd == 0)
521
0
      return_trace (true);
522
0
    else if (designSize < rangeStart ||
523
0
       designSize > rangeEnd ||
524
0
       subfamilyNameID < 256 ||
525
0
       subfamilyNameID > 32767)
526
0
      return_trace (false);
527
0
    else
528
0
      return_trace (true);
529
0
  }
530
531
  void collect_name_ids (hb_set_t *nameids_to_retain /* OUT */) const
532
0
  { nameids_to_retain->add (subfamilyNameID); }
533
534
  bool subset (hb_subset_context_t *c) const
535
0
  {
536
0
    TRACE_SUBSET (this);
537
0
    return_trace ((bool) c->serializer->embed (*this));
538
0
  }
Unexecuted instantiation: OT::FeatureParamsSize::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::FeatureParamsSize::subset(hb_subset_context_t*) const
539
540
  HBUINT16  designSize; /* Represents the design size in 720/inch
541
         * units (decipoints).  The design size entry
542
         * must be non-zero.  When there is a design
543
         * size but no recommended size range, the
544
         * rest of the array will consist of zeros. */
545
  HBUINT16  subfamilyID;  /* Has no independent meaning, but serves
546
         * as an identifier that associates fonts
547
         * in a subfamily. All fonts which share a
548
         * Preferred or Font Family name and which
549
         * differ only by size range shall have the
550
         * same subfamily value, and no fonts which
551
         * differ in weight or style shall have the
552
         * same subfamily value. If this value is
553
         * zero, the remaining fields in the array
554
         * will be ignored. */
555
  NameID  subfamilyNameID;/* If the preceding value is non-zero, this
556
         * value must be set in the range 256 - 32767
557
         * (inclusive). It records the value of a
558
         * field in the name table, which must
559
         * contain English-language strings encoded
560
         * in Windows Unicode and Macintosh Roman,
561
         * and may contain additional strings
562
         * localized to other scripts and languages.
563
         * Each of these strings is the name an
564
         * application should use, in combination
565
         * with the family name, to represent the
566
         * subfamily in a menu.  Applications will
567
         * choose the appropriate version based on
568
         * their selection criteria. */
569
  HBUINT16  rangeStart; /* Large end of the recommended usage range
570
         * (inclusive), stored in 720/inch units
571
         * (decipoints). */
572
  HBUINT16  rangeEnd; /* Small end of the recommended usage range
573
           (exclusive), stored in 720/inch units
574
         * (decipoints). */
575
  public:
576
  DEFINE_SIZE_STATIC (10);
577
};
578
579
/* https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#ssxx */
580
struct FeatureParamsStylisticSet
581
{
582
  bool sanitize (hb_sanitize_context_t *c) const
583
0
  {
584
0
    TRACE_SANITIZE (this);
585
    /* Right now minorVersion is at zero.  Which means, any table supports
586
     * the uiNameID field. */
587
0
    return_trace (c->check_struct (this));
588
0
  }
589
590
  void collect_name_ids (hb_set_t *nameids_to_retain /* OUT */) const
591
0
  { nameids_to_retain->add (uiNameID); }
592
593
  bool subset (hb_subset_context_t *c) const
594
0
  {
595
0
    TRACE_SUBSET (this);
596
0
    return_trace ((bool) c->serializer->embed (*this));
597
0
  }
Unexecuted instantiation: OT::FeatureParamsStylisticSet::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::FeatureParamsStylisticSet::subset(hb_subset_context_t*) const
598
599
  HBUINT16  version;  /* (set to 0): This corresponds to a “minor”
600
         * version number. Additional data may be
601
         * added to the end of this Feature Parameters
602
         * table in the future. */
603
604
  NameID  uiNameID; /* The 'name' table name ID that specifies a
605
         * string (or strings, for multiple languages)
606
         * for a user-interface label for this
607
         * feature.  The values of uiLabelNameId and
608
         * sampleTextNameId are expected to be in the
609
         * font-specific name ID range (256-32767),
610
         * though that is not a requirement in this
611
         * Feature Parameters specification. The
612
         * user-interface label for the feature can
613
         * be provided in multiple languages. An
614
         * English string should be included as a
615
         * fallback. The string should be kept to a
616
         * minimal length to fit comfortably with
617
         * different application interfaces. */
618
  public:
619
  DEFINE_SIZE_STATIC (4);
620
};
621
622
/* https://docs.microsoft.com/en-us/typography/opentype/spec/features_ae#cv01-cv99 */
623
struct FeatureParamsCharacterVariants
624
{
625
  unsigned
626
  get_characters (unsigned start_offset, unsigned *char_count, hb_codepoint_t *chars) const
627
0
  {
628
0
    if (char_count)
629
0
    {
630
0
      + characters.as_array ().sub_array (start_offset, char_count)
631
0
      | hb_sink (hb_array (chars, *char_count))
632
0
      ;
633
0
    }
634
0
    return characters.len;
635
0
  }
636
637
  unsigned get_size () const
638
0
  { return min_size + characters.len * HBUINT24::static_size; }
639
640
  void collect_name_ids (hb_set_t *nameids_to_retain /* OUT */) const
641
0
  {
642
0
    if (featUILableNameID) nameids_to_retain->add (featUILableNameID);
643
0
    if (featUITooltipTextNameID) nameids_to_retain->add (featUITooltipTextNameID);
644
0
    if (sampleTextNameID) nameids_to_retain->add (sampleTextNameID);
645
646
0
    if (!firstParamUILabelNameID || !numNamedParameters || numNamedParameters >= 0x7FFF)
647
0
      return;
648
649
0
    unsigned last_name_id = (unsigned) firstParamUILabelNameID + (unsigned) numNamedParameters - 1;
650
0
    nameids_to_retain->add_range (firstParamUILabelNameID, last_name_id);
651
0
  }
652
653
  bool subset (hb_subset_context_t *c) const
654
0
  {
655
0
    TRACE_SUBSET (this);
656
0
    return_trace ((bool) c->serializer->embed (*this));
657
0
  }
Unexecuted instantiation: OT::FeatureParamsCharacterVariants::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::FeatureParamsCharacterVariants::subset(hb_subset_context_t*) const
658
659
  bool sanitize (hb_sanitize_context_t *c) const
660
0
  {
661
0
    TRACE_SANITIZE (this);
662
0
    return_trace (c->check_struct (this) &&
663
0
      characters.sanitize (c));
664
0
  }
665
666
  HBUINT16  format;     /* Format number is set to 0. */
667
  NameID  featUILableNameID;  /* The ‘name’ table name ID that
668
           * specifies a string (or strings,
669
           * for multiple languages) for a
670
           * user-interface label for this
671
           * feature. (May be NULL.) */
672
  NameID  featUITooltipTextNameID;/* The ‘name’ table name ID that
673
           * specifies a string (or strings,
674
           * for multiple languages) that an
675
           * application can use for tooltip
676
           * text for this feature. (May be
677
           * nullptr.) */
678
  NameID  sampleTextNameID; /* The ‘name’ table name ID that
679
           * specifies sample text that
680
           * illustrates the effect of this
681
           * feature. (May be NULL.) */
682
  HBUINT16  numNamedParameters; /* Number of named parameters. (May
683
           * be zero.) */
684
  NameID  firstParamUILabelNameID;/* The first ‘name’ table name ID
685
           * used to specify strings for
686
           * user-interface labels for the
687
           * feature parameters. (Must be zero
688
           * if numParameters is zero.) */
689
  Array16Of<HBUINT24>
690
    characters;   /* Array of the Unicode Scalar Value
691
           * of the characters for which this
692
           * feature provides glyph variants.
693
           * (May be zero.) */
694
  public:
695
  DEFINE_SIZE_ARRAY (14, characters);
696
};
697
698
struct FeatureParams
699
{
700
  bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const
701
0
  {
702
#ifdef HB_NO_LAYOUT_FEATURE_PARAMS
703
    return true;
704
#endif
705
0
    TRACE_SANITIZE (this);
706
0
    if (tag == HB_TAG ('s','i','z','e'))
707
0
      return_trace (u.size.sanitize (c));
708
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
709
0
      return_trace (u.stylisticSet.sanitize (c));
710
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
711
0
      return_trace (u.characterVariants.sanitize (c));
712
0
    return_trace (true);
713
0
  }
714
715
  void collect_name_ids (hb_tag_t tag, hb_set_t *nameids_to_retain /* OUT */) const
716
0
  {
717
#ifdef HB_NO_LAYOUT_FEATURE_PARAMS
718
    return;
719
#endif
720
0
    if (tag == HB_TAG ('s','i','z','e'))
721
0
      return (u.size.collect_name_ids (nameids_to_retain));
722
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
723
0
      return (u.stylisticSet.collect_name_ids (nameids_to_retain));
724
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
725
0
      return (u.characterVariants.collect_name_ids (nameids_to_retain));
726
0
  }
Unexecuted instantiation: OT::FeatureParams::collect_name_ids(unsigned int, hb_set_t*) const
Unexecuted instantiation: OT::FeatureParams::collect_name_ids(unsigned int, hb_set_t*) const
727
728
  bool subset (hb_subset_context_t *c, const Tag* tag) const
729
0
  {
730
0
    TRACE_SUBSET (this);
731
0
    if (!tag) return_trace (false);
732
0
    if (*tag == HB_TAG ('s','i','z','e'))
733
0
      return_trace (u.size.subset (c));
734
0
    if ((*tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
735
0
      return_trace (u.stylisticSet.subset (c));
736
0
    if ((*tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
737
0
      return_trace (u.characterVariants.subset (c));
738
0
    return_trace (false);
739
0
  }
Unexecuted instantiation: OT::FeatureParams::subset(hb_subset_context_t*, OT::Tag const*) const
Unexecuted instantiation: OT::FeatureParams::subset(hb_subset_context_t*, OT::Tag const*) const
740
741
#ifndef HB_NO_LAYOUT_FEATURE_PARAMS
742
  const FeatureParamsSize& get_size_params (hb_tag_t tag) const
743
0
  {
744
0
    if (tag == HB_TAG ('s','i','z','e'))
745
0
      return u.size;
746
0
    return Null (FeatureParamsSize);
747
0
  }
748
  const FeatureParamsStylisticSet& get_stylistic_set_params (hb_tag_t tag) const
749
0
  {
750
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
751
0
      return u.stylisticSet;
752
0
    return Null (FeatureParamsStylisticSet);
753
0
  }
754
  const FeatureParamsCharacterVariants& get_character_variants_params (hb_tag_t tag) const
755
0
  {
756
0
    if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
757
0
      return u.characterVariants;
758
0
    return Null (FeatureParamsCharacterVariants);
759
0
  }
760
#endif
761
762
  private:
763
  union {
764
  FeatureParamsSize     size;
765
  FeatureParamsStylisticSet   stylisticSet;
766
  FeatureParamsCharacterVariants  characterVariants;
767
  } u;
768
  public:
769
  DEFINE_SIZE_MIN (0);
770
};
771
772
struct Record_sanitize_closure_t {
773
  hb_tag_t tag;
774
  const void *list_base;
775
};
776
777
struct Feature
778
{
779
  unsigned int get_lookup_count () const
780
0
  { return lookupIndex.len; }
781
  hb_tag_t get_lookup_index (unsigned int i) const
782
0
  { return lookupIndex[i]; }
783
  unsigned int get_lookup_indexes (unsigned int start_index,
784
           unsigned int *lookup_count /* IN/OUT */,
785
           unsigned int *lookup_tags /* OUT */) const
786
0
  { return lookupIndex.get_indexes (start_index, lookup_count, lookup_tags); }
787
  void add_lookup_indexes_to (hb_set_t *lookup_indexes) const
788
0
  { lookupIndex.add_indexes_to (lookup_indexes); }
789
790
  const FeatureParams &get_feature_params () const
791
0
  { return this+featureParams; }
792
793
  bool intersects_lookup_indexes (const hb_map_t *lookup_indexes) const
794
0
  { return lookupIndex.intersects (lookup_indexes); }
795
796
  void collect_name_ids (hb_tag_t tag, hb_set_t *nameids_to_retain /* OUT */) const
797
0
  {
798
0
    if (featureParams)
799
0
      get_feature_params ().collect_name_ids (tag, nameids_to_retain);
800
0
  }
801
802
  bool subset (hb_subset_context_t         *c,
803
         hb_subset_layout_context_t  *l,
804
         const Tag                   *tag = nullptr) const
805
0
  {
806
0
    TRACE_SUBSET (this);
807
0
    auto *out = c->serializer->start_embed (*this);
808
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
809
810
0
    out->featureParams.serialize_subset (c, featureParams, this, tag);
811
812
0
    auto it =
813
0
    + hb_iter (lookupIndex)
814
0
    | hb_filter (l->lookup_index_map)
815
0
    | hb_map (l->lookup_index_map)
816
0
    ;
817
818
0
    out->lookupIndex.serialize (c->serializer, l, it);
819
    // The decision to keep or drop this feature is already made before we get here
820
    // so always retain it.
821
0
    return_trace (true);
822
0
  }
Unexecuted instantiation: OT::Feature::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
Unexecuted instantiation: OT::Feature::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
823
824
  bool sanitize (hb_sanitize_context_t *c,
825
     const Record_sanitize_closure_t *closure = nullptr) const
826
0
  {
827
0
    TRACE_SANITIZE (this);
828
0
    if (unlikely (!(c->check_struct (this) && lookupIndex.sanitize (c))))
829
0
      return_trace (false);
830
0
    hb_barrier ();
831
832
    /* Some earlier versions of Adobe tools calculated the offset of the
833
     * FeatureParams subtable from the beginning of the FeatureList table!
834
     *
835
     * If sanitizing "failed" for the FeatureParams subtable, try it with the
836
     * alternative location.  We would know sanitize "failed" if old value
837
     * of the offset was non-zero, but it's zeroed now.
838
     *
839
     * Only do this for the 'size' feature, since at the time of the faulty
840
     * Adobe tools, only the 'size' feature had FeatureParams defined.
841
     */
842
843
0
    if (likely (featureParams.is_null ()))
844
0
      return_trace (true);
845
846
0
    unsigned int orig_offset = featureParams;
847
0
    if (unlikely (!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE)))
848
0
      return_trace (false);
849
0
    hb_barrier ();
850
851
0
    if (featureParams == 0 && closure &&
852
0
  closure->tag == HB_TAG ('s','i','z','e') &&
853
0
  closure->list_base && closure->list_base < this)
854
0
    {
855
0
      unsigned int new_offset_int = orig_offset -
856
0
            (((char *) this) - ((char *) closure->list_base));
857
858
0
      Offset16To<FeatureParams> new_offset;
859
      /* Check that it would not overflow. */
860
0
      new_offset = new_offset_int;
861
0
      if (new_offset == new_offset_int &&
862
0
    c->try_set (&featureParams, new_offset_int) &&
863
0
    !featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))
864
0
  return_trace (false);
865
0
    }
866
867
0
    return_trace (true);
868
0
  }
869
870
  Offset16To<FeatureParams>
871
     featureParams; /* Offset to Feature Parameters table (if one
872
         * has been defined for the feature), relative
873
         * to the beginning of the Feature Table; = Null
874
         * if not required */
875
  IndexArray   lookupIndex; /* Array of LookupList indices */
876
  public:
877
  DEFINE_SIZE_ARRAY_SIZED (4, lookupIndex);
878
};
879
880
template <typename Type>
881
struct Record
882
{
883
0
  int cmp (hb_tag_t a) const { return tag.cmp (a); }
Unexecuted instantiation: OT::Record<OT::LangSys>::cmp(unsigned int) const
Unexecuted instantiation: OT::Record<OT::Script>::cmp(unsigned int) const
Unexecuted instantiation: OT::Record<OT::Feature>::cmp(unsigned int) const
Unexecuted instantiation: OT::Record<OT::JstfLangSys>::cmp(unsigned int) const
Unexecuted instantiation: OT::Record<OT::JstfScript>::cmp(unsigned int) const
884
885
  bool subset (hb_subset_layout_context_t *c, const void *base, const void *f_sub = nullptr) const
886
0
  {
887
0
    TRACE_SUBSET (this);
888
0
    auto *out = c->subset_context->serializer->embed (this);
889
0
    if (unlikely (!out)) return_trace (false);
890
891
0
    if (!f_sub)
892
0
      return_trace (out->offset.serialize_subset (c->subset_context, offset, base, c, &tag));
893
894
0
    const Feature& f = *reinterpret_cast<const Feature *> (f_sub);
895
0
    auto *s = c->subset_context->serializer;
896
0
    s->push ();
897
898
0
    out->offset = 0;
899
0
    bool ret = f.subset (c->subset_context, c, &tag);
900
0
    if (ret)
901
0
      s->add_link (out->offset, s->pop_pack ());
902
0
    else
903
0
      s->pop_discard ();
904
905
0
    return_trace (ret);
906
0
  }
Unexecuted instantiation: OT::Record<OT::Feature>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
Unexecuted instantiation: OT::Record<OT::LangSys>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
Unexecuted instantiation: OT::Record<OT::Script>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
Unexecuted instantiation: OT::Record<OT::Feature>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
Unexecuted instantiation: OT::Record<OT::LangSys>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
Unexecuted instantiation: OT::Record<OT::Script>::subset(OT::hb_subset_layout_context_t*, void const*, void const*) const
907
908
  bool sanitize (hb_sanitize_context_t *c, const void *base) const
909
0
  {
910
0
    TRACE_SANITIZE (this);
911
0
    const Record_sanitize_closure_t closure = {tag, base};
912
0
    return_trace (c->check_struct (this) &&
913
0
      offset.sanitize (c, base, &closure));
914
0
  }
Unexecuted instantiation: OT::Record<OT::LangSys>::sanitize(hb_sanitize_context_t*, void const*) const
Unexecuted instantiation: OT::Record<OT::Script>::sanitize(hb_sanitize_context_t*, void const*) const
Unexecuted instantiation: OT::Record<OT::Feature>::sanitize(hb_sanitize_context_t*, void const*) const
Unexecuted instantiation: OT::Record<OT::JstfLangSys>::sanitize(hb_sanitize_context_t*, void const*) const
Unexecuted instantiation: OT::Record<OT::JstfScript>::sanitize(hb_sanitize_context_t*, void const*) const
915
916
  Tag           tag;            /* 4-byte Tag identifier */
917
  Offset16To<Type>
918
                offset;         /* Offset from beginning of object holding
919
                                 * the Record */
920
  public:
921
  DEFINE_SIZE_STATIC (6);
922
};
923
924
template <typename Type>
925
struct RecordArrayOf : SortedArray16Of<Record<Type>>
926
{
927
  const Offset16To<Type>& get_offset (unsigned int i) const
928
0
  { return (*this)[i].offset; }
Unexecuted instantiation: OT::RecordArrayOf<OT::Script>::get_offset(unsigned int) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Feature>::get_offset(unsigned int) const
929
  Offset16To<Type>& get_offset (unsigned int i)
930
  { return (*this)[i].offset; }
931
  const Tag& get_tag (unsigned int i) const
932
0
  { return (*this)[i].tag; }
Unexecuted instantiation: OT::RecordArrayOf<OT::LangSys>::get_tag(unsigned int) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Script>::get_tag(unsigned int) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Feature>::get_tag(unsigned int) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfLangSys>::get_tag(unsigned int) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfScript>::get_tag(unsigned int) const
933
  unsigned int get_tags (unsigned int start_offset,
934
                         unsigned int *record_count /* IN/OUT */,
935
                         hb_tag_t     *record_tags /* OUT */) const
936
0
  {
937
0
    if (record_count)
938
0
    {
939
0
      + this->as_array ().sub_array (start_offset, record_count)
940
0
      | hb_map (&Record<Type>::tag)
941
0
      | hb_sink (hb_array (record_tags, *record_count))
942
0
      ;
943
0
    }
944
0
    return this->len;
945
0
  }
Unexecuted instantiation: OT::RecordArrayOf<OT::LangSys>::get_tags(unsigned int, unsigned int*, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Script>::get_tags(unsigned int, unsigned int*, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Feature>::get_tags(unsigned int, unsigned int*, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfLangSys>::get_tags(unsigned int, unsigned int*, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfScript>::get_tags(unsigned int, unsigned int*, unsigned int*) const
946
  bool find_index (hb_tag_t tag, unsigned int *index) const
947
0
  {
948
0
    return this->bfind (tag, index, HB_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
949
0
  }
Unexecuted instantiation: OT::RecordArrayOf<OT::LangSys>::find_index(unsigned int, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Script>::find_index(unsigned int, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::Feature>::find_index(unsigned int, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfLangSys>::find_index(unsigned int, unsigned int*) const
Unexecuted instantiation: OT::RecordArrayOf<OT::JstfScript>::find_index(unsigned int, unsigned int*) const
950
};
951
952
template <typename Type>
953
struct RecordListOf : RecordArrayOf<Type>
954
{
955
  const Type& operator [] (unsigned int i) const
956
0
  { return this+this->get_offset (i); }
Unexecuted instantiation: OT::RecordListOf<OT::Script>::operator[](unsigned int) const
Unexecuted instantiation: OT::RecordListOf<OT::Feature>::operator[](unsigned int) const
957
958
  bool subset (hb_subset_context_t *c,
959
               hb_subset_layout_context_t *l) const
960
  {
961
    TRACE_SUBSET (this);
962
    auto *out = c->serializer->start_embed (*this);
963
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
964
965
    + this->iter ()
966
    | hb_apply (subset_record_array (l, out, this))
967
    ;
968
    return_trace (true);
969
  }
970
971
  bool sanitize (hb_sanitize_context_t *c) const
972
0
  {
973
0
    TRACE_SANITIZE (this);
974
0
    return_trace (RecordArrayOf<Type>::sanitize (c, this));
975
0
  }
Unexecuted instantiation: OT::RecordListOf<OT::Script>::sanitize(hb_sanitize_context_t*) const
Unexecuted instantiation: OT::RecordListOf<OT::Feature>::sanitize(hb_sanitize_context_t*) const
976
};
977
978
struct RecordListOfFeature : RecordListOf<Feature>
979
{
980
  bool subset (hb_subset_context_t *c,
981
         hb_subset_layout_context_t *l) const
982
0
  {
983
0
    TRACE_SUBSET (this);
984
0
    auto *out = c->serializer->start_embed (*this);
985
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
986
987
0
    + hb_enumerate (*this)
988
0
    | hb_filter (l->feature_index_map, hb_first)
989
0
    | hb_apply ([l, out, this] (const hb_pair_t<unsigned, const Record<Feature>&>& _)
990
0
                {
991
0
                  const Feature *f_sub = nullptr;
992
0
                  const Feature **f = nullptr;
993
0
                  if (l->feature_substitutes_map->has (_.first, &f))
994
0
                    f_sub = *f;
995
996
0
                  subset_record_array (l, out, this, f_sub) (_.second);
997
0
                })
998
0
    ;
999
1000
0
    return_trace (true);
1001
0
  }
Unexecuted instantiation: OT::RecordListOfFeature::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::RecordListOfFeature::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
1002
};
1003
1004
typedef RecordListOf<Feature> FeatureList;
1005
1006
1007
struct LangSys
1008
{
1009
  unsigned int get_feature_count () const
1010
0
  { return featureIndex.len; }
1011
  hb_tag_t get_feature_index (unsigned int i) const
1012
0
  { return featureIndex[i]; }
1013
  unsigned int get_feature_indexes (unsigned int start_offset,
1014
            unsigned int *feature_count /* IN/OUT */,
1015
            unsigned int *feature_indexes /* OUT */) const
1016
0
  { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); }
1017
  void add_feature_indexes_to (hb_set_t *feature_indexes) const
1018
0
  { featureIndex.add_indexes_to (feature_indexes); }
1019
1020
0
  bool has_required_feature () const { return reqFeatureIndex != 0xFFFFu; }
1021
  unsigned int get_required_feature_index () const
1022
0
  {
1023
0
    if (reqFeatureIndex == 0xFFFFu)
1024
0
      return Index::NOT_FOUND_INDEX;
1025
0
   return reqFeatureIndex;
1026
0
  }
1027
1028
  LangSys* copy (hb_serialize_context_t *c) const
1029
0
  {
1030
0
    TRACE_SERIALIZE (this);
1031
0
    return_trace (c->embed (*this));
1032
0
  }
1033
1034
  bool compare (const LangSys& o, const hb_map_t *feature_index_map) const
1035
0
  {
1036
0
    if (reqFeatureIndex != o.reqFeatureIndex)
1037
0
      return false;
1038
1039
0
    auto iter =
1040
0
    + hb_iter (featureIndex)
1041
0
    | hb_filter (feature_index_map)
1042
0
    | hb_map (feature_index_map)
1043
0
    ;
1044
1045
0
    auto o_iter =
1046
0
    + hb_iter (o.featureIndex)
1047
0
    | hb_filter (feature_index_map)
1048
0
    | hb_map (feature_index_map)
1049
0
    ;
1050
1051
0
    for (; iter && o_iter; iter++, o_iter++)
1052
0
    {
1053
0
      unsigned a = *iter;
1054
0
      unsigned b = *o_iter;
1055
0
      if (a != b) return false;
1056
0
    }
1057
1058
0
    if (iter || o_iter) return false;
1059
1060
0
    return true;
1061
0
  }
1062
1063
  void collect_features (hb_prune_langsys_context_t *c) const
1064
0
  {
1065
0
    if (!has_required_feature () && !get_feature_count ()) return;
1066
0
    if (has_required_feature () &&
1067
0
        c->duplicate_feature_map->has (reqFeatureIndex))
1068
0
      c->new_feature_indexes->add (get_required_feature_index ());
1069
1070
0
    + hb_iter (featureIndex)
1071
0
    | hb_filter (c->duplicate_feature_map)
1072
0
    | hb_sink (c->new_feature_indexes)
1073
0
    ;
1074
0
  }
1075
1076
  bool subset (hb_subset_context_t        *c,
1077
         hb_subset_layout_context_t *l,
1078
         const Tag                  *tag = nullptr) const
1079
0
  {
1080
0
    TRACE_SUBSET (this);
1081
0
    auto *out = c->serializer->start_embed (*this);
1082
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1083
1084
0
    const uint32_t *v;
1085
0
    out->reqFeatureIndex = l->feature_index_map->has (reqFeatureIndex, &v) ? *v : 0xFFFFu;
1086
1087
0
    if (!l->visitFeatureIndex (featureIndex.len))
1088
0
      return_trace (false);
1089
1090
0
    auto it =
1091
0
    + hb_iter (featureIndex)
1092
0
    | hb_filter (l->feature_index_map)
1093
0
    | hb_map (l->feature_index_map)
1094
0
    ;
1095
1096
0
    bool ret = bool (it);
1097
0
    out->featureIndex.serialize (c->serializer, l, it);
1098
0
    return_trace (ret);
1099
0
  }
Unexecuted instantiation: OT::LangSys::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
Unexecuted instantiation: OT::LangSys::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
1100
1101
  bool sanitize (hb_sanitize_context_t *c,
1102
     const Record_sanitize_closure_t * = nullptr) const
1103
0
  {
1104
0
    TRACE_SANITIZE (this);
1105
0
    return_trace (c->check_struct (this) && featureIndex.sanitize (c));
1106
0
  }
1107
1108
  Offset16  lookupOrderZ; /* = Null (reserved for an offset to a
1109
         * reordering table) */
1110
  HBUINT16  reqFeatureIndex;/* Index of a feature required for this
1111
         * language system--if no required features
1112
         * = 0xFFFFu */
1113
  IndexArray  featureIndex; /* Array of indices into the FeatureList */
1114
  public:
1115
  DEFINE_SIZE_ARRAY_SIZED (6, featureIndex);
1116
};
1117
DECLARE_NULL_NAMESPACE_BYTES (OT, LangSys);
1118
1119
struct Script
1120
{
1121
  unsigned int get_lang_sys_count () const
1122
0
  { return langSys.len; }
1123
  const Tag& get_lang_sys_tag (unsigned int i) const
1124
0
  { return langSys.get_tag (i); }
1125
  unsigned int get_lang_sys_tags (unsigned int start_offset,
1126
          unsigned int *lang_sys_count /* IN/OUT */,
1127
          hb_tag_t     *lang_sys_tags /* OUT */) const
1128
0
  { return langSys.get_tags (start_offset, lang_sys_count, lang_sys_tags); }
1129
  const LangSys& get_lang_sys (unsigned int i) const
1130
0
  {
1131
0
    if (i == Index::NOT_FOUND_INDEX) return get_default_lang_sys ();
1132
0
    return this+langSys[i].offset;
1133
0
  }
1134
  bool find_lang_sys_index (hb_tag_t tag, unsigned int *index) const
1135
0
  { return langSys.find_index (tag, index); }
1136
1137
0
  bool has_default_lang_sys () const           { return defaultLangSys != 0; }
1138
0
  const LangSys& get_default_lang_sys () const { return this+defaultLangSys; }
1139
1140
  void prune_langsys (hb_prune_langsys_context_t *c,
1141
                      unsigned script_index) const
1142
0
  {
1143
0
    if (!has_default_lang_sys () && !get_lang_sys_count ()) return;
1144
0
    if (!c->visitScript ()) return;
1145
1146
0
    if (!c->script_langsys_map->has (script_index))
1147
0
    {
1148
0
      if (unlikely (!c->script_langsys_map->set (script_index, hb::unique_ptr<hb_set_t> {hb_set_create ()})))
1149
0
  return;
1150
0
    }
1151
1152
0
    if (has_default_lang_sys ())
1153
0
    {
1154
      //only collect features from non-redundant langsys
1155
0
      const LangSys& d = get_default_lang_sys ();
1156
0
      if (c->visitLangsys (d.get_feature_count ())) {
1157
0
        d.collect_features (c);
1158
0
      }
1159
1160
0
      for (auto _ : + hb_enumerate (langSys))
1161
0
      {
1162
0
        const LangSys& l = this+_.second.offset;
1163
0
        if (!c->visitLangsys (l.get_feature_count ())) continue;
1164
0
        if (l.compare (d, c->duplicate_feature_map)) continue;
1165
1166
0
        l.collect_features (c);
1167
0
        c->script_langsys_map->get (script_index)->add (_.first);
1168
0
      }
1169
0
    }
1170
0
    else
1171
0
    {
1172
0
      for (auto _ : + hb_enumerate (langSys))
1173
0
      {
1174
0
        const LangSys& l = this+_.second.offset;
1175
0
        if (!c->visitLangsys (l.get_feature_count ())) continue;
1176
0
        l.collect_features (c);
1177
0
        c->script_langsys_map->get (script_index)->add (_.first);
1178
0
      }
1179
0
    }
1180
0
  }
Unexecuted instantiation: OT::Script::prune_langsys(OT::hb_prune_langsys_context_t*, unsigned int) const
Unexecuted instantiation: OT::Script::prune_langsys(OT::hb_prune_langsys_context_t*, unsigned int) const
1181
1182
  bool subset (hb_subset_context_t         *c,
1183
         hb_subset_layout_context_t  *l,
1184
         const Tag                   *tag) const
1185
0
  {
1186
0
    TRACE_SUBSET (this);
1187
0
    if (!l->visitScript ()) return_trace (false);
1188
0
    if (tag && !c->plan->layout_scripts.has (*tag))
1189
0
      return false;
1190
1191
0
    auto *out = c->serializer->start_embed (*this);
1192
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1193
1194
0
    bool defaultLang = false;
1195
0
    if (has_default_lang_sys ())
1196
0
    {
1197
0
      c->serializer->push ();
1198
0
      const LangSys& ls = this+defaultLangSys;
1199
0
      bool ret = ls.subset (c, l);
1200
0
      if (!ret && tag && *tag != HB_TAG ('D', 'F', 'L', 'T'))
1201
0
      {
1202
0
  c->serializer->pop_discard ();
1203
0
  out->defaultLangSys = 0;
1204
0
      }
1205
0
      else
1206
0
      {
1207
0
  c->serializer->add_link (out->defaultLangSys, c->serializer->pop_pack ());
1208
0
  defaultLang = true;
1209
0
      }
1210
0
    }
1211
1212
0
    const hb_set_t *active_langsys = l->script_langsys_map->get (l->cur_script_index);
1213
0
    if (active_langsys)
1214
0
    {
1215
0
      + hb_enumerate (langSys)
1216
0
      | hb_filter (active_langsys, hb_first)
1217
0
      | hb_map (hb_second)
1218
0
      | hb_filter ([=] (const Record<LangSys>& record) {return l->visitLangSys (); })
1219
0
      | hb_apply (subset_record_array (l, &(out->langSys), this))
1220
0
      ;
1221
0
    }
1222
1223
0
    return_trace (bool (out->langSys.len) || defaultLang || l->table_tag == HB_OT_TAG_GSUB);
1224
0
  }
Unexecuted instantiation: OT::Script::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
Unexecuted instantiation: OT::Script::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, OT::Tag const*) const
1225
1226
  bool sanitize (hb_sanitize_context_t *c,
1227
     const Record_sanitize_closure_t * = nullptr) const
1228
0
  {
1229
0
    TRACE_SANITIZE (this);
1230
0
    return_trace (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this));
1231
0
  }
1232
1233
  protected:
1234
  Offset16To<LangSys>
1235
    defaultLangSys; /* Offset to DefaultLangSys table--from
1236
         * beginning of Script table--may be Null */
1237
  RecordArrayOf<LangSys>
1238
    langSys;  /* Array of LangSysRecords--listed
1239
         * alphabetically by LangSysTag */
1240
  public:
1241
  DEFINE_SIZE_ARRAY_SIZED (4, langSys);
1242
};
1243
1244
struct RecordListOfScript : RecordListOf<Script>
1245
{
1246
  bool subset (hb_subset_context_t *c,
1247
               hb_subset_layout_context_t *l) const
1248
0
  {
1249
0
    TRACE_SUBSET (this);
1250
0
    auto *out = c->serializer->start_embed (*this);
1251
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1252
1253
0
    for (auto _ : + hb_enumerate (*this))
1254
0
    {
1255
0
      auto snap = c->serializer->snapshot ();
1256
0
      l->cur_script_index = _.first;
1257
0
      bool ret = _.second.subset (l, this);
1258
0
      if (!ret) c->serializer->revert (snap);
1259
0
      else out->len++;
1260
0
    }
1261
1262
0
    return_trace (true);
1263
0
  }
Unexecuted instantiation: OT::RecordListOfScript::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::RecordListOfScript::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
1264
};
1265
1266
typedef RecordListOfScript ScriptList;
1267
1268
1269
1270
struct LookupFlag : HBUINT16
1271
{
1272
  enum Flags {
1273
    RightToLeft   = 0x0001u,
1274
    IgnoreBaseGlyphs  = 0x0002u,
1275
    IgnoreLigatures = 0x0004u,
1276
    IgnoreMarks   = 0x0008u,
1277
    IgnoreFlags   = 0x000Eu,
1278
    UseMarkFilteringSet = 0x0010u,
1279
    Reserved    = 0x00E0u,
1280
    MarkAttachmentType  = 0xFF00u
1281
  };
1282
  public:
1283
  DEFINE_SIZE_STATIC (2);
1284
};
1285
1286
} /* namespace OT */
1287
/* This has to be outside the namespace. */
1288
HB_MARK_AS_FLAG_T (OT::LookupFlag::Flags);
1289
namespace OT {
1290
1291
struct Lookup
1292
{
1293
0
  unsigned int get_subtable_count () const { return subTable.len; }
1294
1295
  template <typename TSubTable>
1296
  const Array16OfOffset16To<TSubTable>& get_subtables () const
1297
0
  { return reinterpret_cast<const Array16OfOffset16To<TSubTable> &> (subTable); }
Unexecuted instantiation: OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > const& OT::Lookup::get_subtables<OT::Layout::GPOS_impl::PosLookupSubTable>() const
Unexecuted instantiation: OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> > const& OT::Lookup::get_subtables<OT::Layout::GSUB_impl::SubstLookupSubTable>() const
1298
  template <typename TSubTable>
1299
  Array16OfOffset16To<TSubTable>& get_subtables ()
1300
0
  { return reinterpret_cast<Array16OfOffset16To<TSubTable> &> (subTable); }
Unexecuted instantiation: OT::ArrayOf<OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >& OT::Lookup::get_subtables<OT::Layout::GPOS_impl::PosLookupSubTable>()
Unexecuted instantiation: OT::ArrayOf<OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true>, OT::IntType<unsigned short, 2u> >& OT::Lookup::get_subtables<OT::Layout::GSUB_impl::SubstLookupSubTable>()
1301
1302
  template <typename TSubTable>
1303
  const TSubTable& get_subtable (unsigned int i) const
1304
0
  { return this+get_subtables<TSubTable> ()[i]; }
Unexecuted instantiation: OT::Layout::GPOS_impl::PosLookupSubTable const& OT::Lookup::get_subtable<OT::Layout::GPOS_impl::PosLookupSubTable>(unsigned int) const
Unexecuted instantiation: OT::Layout::GSUB_impl::SubstLookupSubTable const& OT::Lookup::get_subtable<OT::Layout::GSUB_impl::SubstLookupSubTable>(unsigned int) const
1305
  template <typename TSubTable>
1306
  TSubTable& get_subtable (unsigned int i)
1307
  { return this+get_subtables<TSubTable> ()[i]; }
1308
1309
  unsigned int get_size () const
1310
0
  {
1311
0
    const HBUINT16 &markFilteringSet = StructAfter<const HBUINT16> (subTable);
1312
0
    if (lookupFlag & LookupFlag::UseMarkFilteringSet)
1313
0
      return (const char *) &StructAfter<const char> (markFilteringSet) - (const char *) this;
1314
0
    return (const char *) &markFilteringSet - (const char *) this;
1315
0
  }
1316
1317
0
  unsigned int get_type () const { return lookupType; }
1318
1319
  /* lookup_props is a 32-bit integer where the lower 16-bit is LookupFlag and
1320
   * higher 16-bit is mark-filtering-set if the lookup uses one.
1321
   * Not to be confused with glyph_props which is very similar. */
1322
  uint32_t get_props () const
1323
0
  {
1324
0
    unsigned int flag = lookupFlag;
1325
0
    if (unlikely (flag & LookupFlag::UseMarkFilteringSet))
1326
0
    {
1327
0
      const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1328
0
      flag += (markFilteringSet << 16);
1329
0
    }
1330
0
    return flag;
1331
0
  }
1332
1333
  template <typename TSubTable, typename context_t, typename ...Ts>
1334
  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
1335
0
  {
1336
0
    unsigned int lookup_type = get_type ();
1337
0
    TRACE_DISPATCH (this, lookup_type);
1338
0
    unsigned int count = get_subtable_count ();
1339
0
    for (unsigned int i = 0; i < count; i++) {
1340
0
      typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type, std::forward<Ts> (ds)...);
1341
0
      if (c->stop_sublookup_iteration (r))
1342
0
  return_trace (r);
1343
0
    }
1344
0
    return_trace (c->default_return_value ());
1345
0
  }
Unexecuted instantiation: OT::hb_ot_apply_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_ot_apply_context_t>(OT::hb_ot_apply_context_t*) const
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: OT::hb_collect_glyphs_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const
Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const
Unexecuted instantiation: OT::hb_collect_variation_indices_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_collect_variation_indices_context_t>(OT::hb_collect_variation_indices_context_t*) const
Unexecuted instantiation: OT::hb_accelerate_subtables_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_accelerate_subtables_context_t>(OT::hb_accelerate_subtables_context_t*) const
Unexecuted instantiation: OT::hb_have_non_1to1_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_have_non_1to1_context_t>(OT::hb_have_non_1to1_context_t*) const
Unexecuted instantiation: OT::hb_ot_apply_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_ot_apply_context_t>(OT::hb_ot_apply_context_t*) const
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: OT::hb_closure_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_closure_context_t>(OT::hb_closure_context_t*) const
Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const
Unexecuted instantiation: OT::hb_collect_glyphs_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const
Unexecuted instantiation: OT::hb_would_apply_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_would_apply_context_t>(OT::hb_would_apply_context_t*) const
Unexecuted instantiation: OT::hb_accelerate_subtables_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_accelerate_subtables_context_t>(OT::hb_accelerate_subtables_context_t*) const
Unexecuted instantiation: hb_get_glyph_alternates_dispatch_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, hb_get_glyph_alternates_dispatch_t, unsigned int&, unsigned int&, unsigned int*&, unsigned int*&>(hb_get_glyph_alternates_dispatch_t*, unsigned int&, unsigned int&, unsigned int*&, unsigned int*&) const
Unexecuted instantiation: hb_position_single_dispatch_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, hb_position_single_dispatch_t, hb_font_t*&, hb_blob_t*&, hb_direction_t&, unsigned int&, hb_glyph_position_t&>(hb_position_single_dispatch_t*, hb_font_t*&, hb_blob_t*&, hb_direction_t&, unsigned int&, hb_glyph_position_t&) const
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const
Unexecuted instantiation: OT::hb_collect_variation_indices_context_t::return_t OT::Lookup::dispatch<OT::Layout::GPOS_impl::PosLookupSubTable, OT::hb_collect_variation_indices_context_t>(OT::hb_collect_variation_indices_context_t*) const
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Lookup::dispatch<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const
1346
1347
  bool serialize (hb_serialize_context_t *c,
1348
      unsigned int lookup_type,
1349
      uint32_t lookup_props,
1350
      unsigned int num_subtables)
1351
0
  {
1352
0
    TRACE_SERIALIZE (this);
1353
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
1354
0
    lookupType = lookup_type;
1355
0
    lookupFlag = lookup_props & 0xFFFFu;
1356
0
    if (unlikely (!subTable.serialize (c, num_subtables))) return_trace (false);
1357
0
    if (lookupFlag & LookupFlag::UseMarkFilteringSet)
1358
0
    {
1359
0
      if (unlikely (!c->extend (this))) return_trace (false);
1360
0
      HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1361
0
      markFilteringSet = lookup_props >> 16;
1362
0
    }
1363
0
    return_trace (true);
1364
0
  }
1365
1366
  template <typename TSubTable>
1367
  bool subset (hb_subset_context_t *c) const
1368
0
  {
1369
0
    TRACE_SUBSET (this);
1370
0
    auto *out = c->serializer->start_embed (*this);
1371
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1372
0
    out->lookupType = lookupType;
1373
0
    out->lookupFlag = lookupFlag;
1374
1375
0
    const hb_set_t *glyphset = c->plan->glyphset_gsub ();
1376
0
    unsigned int lookup_type = get_type ();
1377
0
    + hb_iter (get_subtables <TSubTable> ())
1378
0
    | hb_filter ([this, glyphset, lookup_type] (const Offset16To<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
Unexecuted instantiation: OT::Lookup::subset<OT::Layout::GSUB_impl::SubstLookupSubTable>(hb_subset_context_t*) const::{lambda(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)#1}::operator()(OT::OffsetTo<OT::Layout::GSUB_impl::SubstLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&) const
Unexecuted instantiation: OT::Lookup::subset<OT::Layout::GPOS_impl::PosLookupSubTable>(hb_subset_context_t*) const::{lambda(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&)#1}::operator()(OT::OffsetTo<OT::Layout::GPOS_impl::PosLookupSubTable, OT::IntType<unsigned short, 2u>, void, true> const&) const
1379
0
    | hb_apply (subset_offset_array (c, out->get_subtables<TSubTable> (), this, lookup_type))
1380
0
    ;
1381
1382
0
    if (lookupFlag & LookupFlag::UseMarkFilteringSet)
1383
0
    {
1384
0
      const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1385
0
      hb_codepoint_t *idx;
1386
0
      if (!c->plan->used_mark_sets_map.has (markFilteringSet, &idx))
1387
0
      {
1388
0
        unsigned new_flag = lookupFlag;
1389
0
        new_flag &= ~LookupFlag::UseMarkFilteringSet;
1390
0
        out->lookupFlag = new_flag;
1391
0
      }
1392
0
      else
1393
0
      {
1394
0
        if (unlikely (!c->serializer->extend (out))) return_trace (false);
1395
0
        HBUINT16 &outMarkFilteringSet = StructAfter<HBUINT16> (out->subTable);
1396
0
        outMarkFilteringSet = *idx;
1397
0
      }
1398
0
    }
1399
1400
    // Always keep the lookup even if it's empty. The rest of layout subsetting depends on lookup
1401
    // indices being consistent with those computed during planning. So if an empty lookup is
1402
    // discarded during the subset phase it will invalidate all subsequent lookup indices.
1403
    // Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning
1404
    // phase, but it can happen in rare cases such as when during closure subtable is considered
1405
    // degenerate (see: https://github.com/harfbuzz/harfbuzz/issues/3853)
1406
0
    return_trace (true);
1407
0
  }
Unexecuted instantiation: bool OT::Lookup::subset<OT::Layout::GPOS_impl::PosLookupSubTable>(hb_subset_context_t*) const
Unexecuted instantiation: bool OT::Lookup::subset<OT::Layout::GSUB_impl::SubstLookupSubTable>(hb_subset_context_t*) const
Unexecuted instantiation: bool OT::Lookup::subset<OT::Layout::GPOS_impl::PosLookupSubTable>(hb_subset_context_t*) const
Unexecuted instantiation: bool OT::Lookup::subset<OT::Layout::GSUB_impl::SubstLookupSubTable>(hb_subset_context_t*) const
1408
1409
  template <typename TSubTable>
1410
  bool sanitize (hb_sanitize_context_t *c) const
1411
0
  {
1412
0
    TRACE_SANITIZE (this);
1413
0
    if (!(c->check_struct (this) && subTable.sanitize (c))) return_trace (false);
1414
0
    hb_barrier ();
1415
1416
0
    unsigned subtables = get_subtable_count ();
1417
0
    if (unlikely (!c->visit_subtables (subtables))) return_trace (false);
1418
1419
0
    if (lookupFlag & LookupFlag::UseMarkFilteringSet)
1420
0
    {
1421
0
      const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1422
0
      if (!markFilteringSet.sanitize (c)) return_trace (false);
1423
0
    }
1424
1425
0
    if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ())))
1426
0
      return_trace (false);
1427
1428
0
    if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ()))
1429
0
    {
1430
0
      hb_barrier ();
1431
1432
      /* The spec says all subtables of an Extension lookup should
1433
       * have the same type, which shall not be the Extension type
1434
       * itself (but we already checked for that).
1435
       * This is specially important if one has a reverse type!
1436
       *
1437
       * We only do this if sanitizer edit_count is zero.  Otherwise,
1438
       * some of the subtables might have become insane after they
1439
       * were sanity-checked by the edits of subsequent subtables.
1440
       * https://bugs.chromium.org/p/chromium/issues/detail?id=960331
1441
       */
1442
0
      unsigned int type = get_subtable<TSubTable> (0).u.extension.get_type ();
1443
0
      for (unsigned int i = 1; i < subtables; i++)
1444
0
  if (get_subtable<TSubTable> (i).u.extension.get_type () != type)
1445
0
    return_trace (false);
1446
0
    }
1447
0
    return_trace (true);
1448
0
  }
Unexecuted instantiation: bool OT::Lookup::sanitize<OT::Layout::GPOS_impl::PosLookupSubTable>(hb_sanitize_context_t*) const
Unexecuted instantiation: bool OT::Lookup::sanitize<OT::Layout::GSUB_impl::SubstLookupSubTable>(hb_sanitize_context_t*) const
1449
1450
  protected:
1451
  HBUINT16  lookupType;   /* Different enumerations for GSUB and GPOS */
1452
  HBUINT16  lookupFlag;   /* Lookup qualifiers */
1453
  Array16Of<Offset16>
1454
    subTable;   /* Array of SubTables */
1455
/*HBUINT16  markFilteringSetX[HB_VAR_ARRAY];*//* Index (base 0) into GDEF mark glyph sets
1456
           * structure. This field is only present if bit
1457
           * UseMarkFilteringSet of lookup flags is set. */
1458
  public:
1459
  DEFINE_SIZE_ARRAY (6, subTable);
1460
};
1461
1462
template <typename Types>
1463
using LookupList = List16OfOffsetTo<Lookup, typename Types::HBUINT>;
1464
1465
template <typename TLookup, typename OffsetType>
1466
struct LookupOffsetList : List16OfOffsetTo<TLookup, OffsetType>
1467
{
1468
  bool subset (hb_subset_context_t        *c,
1469
         hb_subset_layout_context_t *l) const
1470
0
  {
1471
0
    TRACE_SUBSET (this);
1472
0
    auto *out = c->serializer->start_embed (this);
1473
0
    if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1474
1475
0
    + hb_enumerate (*this)
1476
0
    | hb_filter (l->lookup_index_map, hb_first)
1477
0
    | hb_map (hb_second)
1478
0
    | hb_apply (subset_offset_array (c, *out, this))
1479
0
    ;
1480
0
    return_trace (true);
1481
0
  }
Unexecuted instantiation: OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::LookupOffsetList<OT::Layout::GPOS_impl::PosLookup, OT::IntType<unsigned short, 2u> >::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::LookupOffsetList<OT::Layout::GSUB_impl::SubstLookup, OT::IntType<unsigned short, 2u> >::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
1482
1483
  bool sanitize (hb_sanitize_context_t *c) const
1484
  {
1485
    TRACE_SANITIZE (this);
1486
    return_trace (List16OfOffset16To<TLookup>::sanitize (c, this));
1487
  }
1488
};
1489
1490
1491
/*
1492
 * Coverage Table
1493
 */
1494
1495
1496
static bool ClassDef_remap_and_serialize (hb_serialize_context_t *c,
1497
            const hb_set_t &klasses,
1498
                                          bool use_class_zero,
1499
                                          hb_sorted_vector_t<hb_codepoint_pair_t> &glyph_and_klass, /* IN/OUT */
1500
            hb_map_t *klass_map /*IN/OUT*/)
1501
0
{
1502
0
  if (!klass_map)
1503
0
    return ClassDef_serialize (c, glyph_and_klass.iter ());
1504
1505
  /* any glyph not assigned a class value falls into Class zero (0),
1506
   * if any glyph assigned to class 0, remapping must start with 0->0*/
1507
0
  if (!use_class_zero)
1508
0
    klass_map->set (0, 0);
1509
1510
0
  unsigned idx = klass_map->has (0) ? 1 : 0;
1511
0
  for (const unsigned k: klasses)
1512
0
  {
1513
0
    if (klass_map->has (k)) continue;
1514
0
    klass_map->set (k, idx);
1515
0
    idx++;
1516
0
  }
1517
1518
1519
0
  for (unsigned i = 0; i < glyph_and_klass.length; i++)
1520
0
  {
1521
0
    hb_codepoint_t klass = glyph_and_klass[i].second;
1522
0
    glyph_and_klass[i].second = klass_map->get (klass);
1523
0
  }
1524
1525
0
  c->propagate_error (glyph_and_klass, klasses);
1526
0
  return ClassDef_serialize (c, glyph_and_klass.iter ());
1527
0
}
Unexecuted instantiation: hb-face.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-face.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-shape.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-shaper-arabic.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-static.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: gsubgpos-context.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-aat-layout.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-aat-map.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-font.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-font.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-layout.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-metrics.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-shape-fallback.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-var.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-cff1.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-cff2.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-plan.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-cff1-table.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-ot-cff2-table.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-cff-common.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-plan-layout.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
Unexecuted instantiation: hb-subset-plan-var.cc:OT::ClassDef_remap_and_serialize(hb_serialize_context_t*, hb_set_t const&, bool, hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>&, hb_map_t*)
1528
1529
/*
1530
 * Class Definition Table
1531
 */
1532
1533
template <typename Types>
1534
struct ClassDefFormat1_3
1535
{
1536
  friend struct ClassDef;
1537
1538
  private:
1539
  unsigned int get_class (hb_codepoint_t glyph_id) const
1540
0
  {
1541
0
    return classValue[(unsigned int) (glyph_id - startGlyph)];
1542
0
  }
1543
1544
  unsigned get_population () const
1545
0
  {
1546
0
    return classValue.len;
1547
0
  }
1548
1549
  template<typename Iterator,
1550
     hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_t))>
1551
  bool serialize (hb_serialize_context_t *c,
1552
      Iterator it)
1553
0
  {
1554
0
    TRACE_SERIALIZE (this);
1555
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
1556
1557
0
    if (unlikely (!it))
1558
0
    {
1559
0
      classFormat = 1;
1560
0
      startGlyph = 0;
1561
0
      classValue.len = 0;
1562
0
      return_trace (true);
1563
0
    }
1564
1565
0
    hb_codepoint_t glyph_min = (*it).first;
1566
0
    hb_codepoint_t glyph_max = + it
1567
0
             | hb_map (hb_first)
1568
0
             | hb_reduce (hb_max, 0u);
1569
0
    unsigned glyph_count = glyph_max - glyph_min + 1;
1570
1571
0
    startGlyph = glyph_min;
1572
0
    if (unlikely (!classValue.serialize (c, glyph_count))) return_trace (false);
1573
0
    for (const hb_pair_t<hb_codepoint_t, uint32_t> gid_klass_pair : + it)
1574
0
    {
1575
0
      unsigned idx = gid_klass_pair.first - glyph_min;
1576
0
      classValue[idx] = gid_klass_pair.second;
1577
0
    }
1578
0
    return_trace (true);
1579
0
  }
Unexecuted instantiation: hb-face.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-face.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shape.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-static.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI13hb_map_iter_tIS5_IS6_INS1_6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNSB_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKSB_11clone_rangeESD_jjEUljE0_RK3$_7LSG_0EEZNKSB_11clone_rangeESD_jjEUl9hb_pair_tIjjEE_LSF_1ELSG_0EESL_RK3$_6LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSW_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tIS5_I13hb_map_iter_tINS1_6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNSB_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNSB_6shrinkESD_jEUljE0_RK3$_7LSG_0EESL_RK3$_6LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSS_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSS_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_8RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI13hb_map_iter_tIS5_IS6_INS1_6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNSB_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKSB_11clone_rangeESD_jjEUljE0_RK3$_8LSG_0EEZNKSB_11clone_rangeESD_jjEUl9hb_pair_tIjjEE_LSF_1ELSG_0EESL_RK3$_5LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSW_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tIS5_I13hb_map_iter_tINS1_6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNSB_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNSB_6shrinkESD_jEUljE0_RK3$_8LSG_0EESL_RK3$_5LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSS_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSS_
Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-aat-map.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-font.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-font.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-metrics.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-var.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff1.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff2.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-cff1-table.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-cff2-table.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff-common.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan-layout.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan-var.cc:_ZN2OT17ClassDefFormat1_3INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
1580
1581
  bool subset (hb_subset_context_t *c,
1582
         hb_map_t *klass_map = nullptr /*OUT*/,
1583
               bool keep_empty_table = true,
1584
               bool use_class_zero = true,
1585
               const Coverage* glyph_filter = nullptr) const
1586
0
  {
1587
0
    TRACE_SUBSET (this);
1588
0
    const hb_map_t &glyph_map = c->plan->glyph_map_gsub;
1589
1590
0
    hb_sorted_vector_t<hb_codepoint_pair_t> glyph_and_klass;
1591
0
    hb_set_t orig_klasses;
1592
1593
0
    hb_codepoint_t start = startGlyph;
1594
0
    hb_codepoint_t end   = start + classValue.len;
1595
1596
0
    for (const hb_codepoint_t gid : + hb_range (start, end))
1597
0
    {
1598
0
      hb_codepoint_t new_gid = glyph_map[gid];
1599
0
      if (new_gid == HB_MAP_VALUE_INVALID) continue;
1600
0
      if (glyph_filter && !glyph_filter->has(gid)) continue;
1601
1602
0
      unsigned klass = classValue[gid - start];
1603
0
      if (!klass) continue;
1604
1605
0
      glyph_and_klass.push (hb_pair (new_gid, klass));
1606
0
      orig_klasses.add (klass);
1607
0
    }
1608
1609
0
    if (use_class_zero)
1610
0
    {
1611
0
      unsigned glyph_count = glyph_filter
1612
0
           ? hb_len (hb_iter (glyph_map.keys()) | hb_filter (glyph_filter))
1613
0
           : glyph_map.get_population ();
1614
0
      use_class_zero = glyph_count <= glyph_and_klass.length;
1615
0
    }
1616
0
    if (!ClassDef_remap_and_serialize (c->serializer,
1617
0
                                       orig_klasses,
1618
0
                                       use_class_zero,
1619
0
                                       glyph_and_klass,
1620
0
                                       klass_map))
1621
0
      return_trace (false);
1622
0
    return_trace (keep_empty_table || (bool) glyph_and_klass);
1623
0
  }
Unexecuted instantiation: OT::ClassDefFormat1_3<OT::Layout::SmallTypes>::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
Unexecuted instantiation: OT::ClassDefFormat1_3<OT::Layout::SmallTypes>::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
1624
1625
  bool sanitize (hb_sanitize_context_t *c) const
1626
0
  {
1627
0
    TRACE_SANITIZE (this);
1628
0
    return_trace (c->check_struct (this) && classValue.sanitize (c));
1629
0
  }
1630
1631
0
  unsigned cost () const { return 1; }
1632
1633
  template <typename set_t>
1634
  bool collect_coverage (set_t *glyphs) const
1635
0
  {
1636
0
    unsigned int start = 0;
1637
0
    unsigned int count = classValue.len;
1638
0
    for (unsigned int i = 0; i < count; i++)
1639
0
    {
1640
0
      if (classValue[i])
1641
0
  continue;
1642
1643
0
      if (start != i)
1644
0
  if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + i)))
1645
0
    return false;
1646
1647
0
      start = i + 1;
1648
0
    }
1649
0
    if (start != count)
1650
0
      if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + count)))
1651
0
  return false;
1652
1653
0
    return true;
1654
0
  }
1655
1656
  template <typename set_t>
1657
  bool collect_class (set_t *glyphs, unsigned klass) const
1658
0
  {
1659
0
    unsigned int count = classValue.len;
1660
0
    for (unsigned int i = 0; i < count; i++)
1661
0
      if (classValue[i] == klass) glyphs->add (startGlyph + i);
1662
0
    return true;
1663
0
  }
1664
1665
  bool intersects (const hb_set_t *glyphs) const
1666
0
  {
1667
0
    hb_codepoint_t start = startGlyph;
1668
0
    hb_codepoint_t end = startGlyph + classValue.len;
1669
0
    for (hb_codepoint_t iter = startGlyph - 1;
1670
0
   glyphs->next (&iter) && iter < end;)
1671
0
      if (classValue[iter - start]) return true;
1672
0
    return false;
1673
0
  }
1674
  bool intersects_class (const hb_set_t *glyphs, uint16_t klass) const
1675
0
  {
1676
0
    unsigned int count = classValue.len;
1677
0
    if (klass == 0)
1678
0
    {
1679
      /* Match if there's any glyph that is not listed! */
1680
0
      hb_codepoint_t g = HB_SET_VALUE_INVALID;
1681
0
      if (!glyphs->next (&g)) return false;
1682
0
      if (g < startGlyph) return true;
1683
0
      g = startGlyph + count - 1;
1684
0
      if (glyphs->next (&g)) return true;
1685
      /* Fall through. */
1686
0
    }
1687
    /* TODO Speed up, using set overlap first? */
1688
    /* TODO(iter) Rewrite as dagger. */
1689
0
    const HBUINT16 *arr = classValue.arrayZ;
1690
0
    for (unsigned int i = 0; i < count; i++)
1691
0
      if (arr[i] == klass && glyphs->has (startGlyph + i))
1692
0
  return true;
1693
0
    return false;
1694
0
  }
1695
1696
  void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
1697
0
  {
1698
0
    unsigned count = classValue.len;
1699
0
    if (klass == 0)
1700
0
    {
1701
0
      unsigned start_glyph = startGlyph;
1702
0
      for (uint32_t g = HB_SET_VALUE_INVALID;
1703
0
     glyphs->next (&g) && g < start_glyph;)
1704
0
  intersect_glyphs->add (g);
1705
1706
0
      for (uint32_t g = startGlyph + count - 1;
1707
0
     glyphs-> next (&g);)
1708
0
  intersect_glyphs->add (g);
1709
1710
0
      return;
1711
0
    }
1712
1713
0
    for (unsigned i = 0; i < count; i++)
1714
0
      if (classValue[i] == klass && glyphs->has (startGlyph + i))
1715
0
  intersect_glyphs->add (startGlyph + i);
1716
1717
#if 0
1718
    /* The following implementation is faster asymptotically, but slower
1719
     * in practice. */
1720
    unsigned start_glyph = startGlyph;
1721
    unsigned end_glyph = start_glyph + count;
1722
    for (unsigned g = startGlyph - 1;
1723
   glyphs->next (&g) && g < end_glyph;)
1724
      if (classValue.arrayZ[g - start_glyph] == klass)
1725
        intersect_glyphs->add (g);
1726
#endif
1727
0
  }
1728
1729
  void intersected_classes (const hb_set_t *glyphs, hb_set_t *intersect_classes) const
1730
0
  {
1731
0
    if (glyphs->is_empty ()) return;
1732
0
    hb_codepoint_t end_glyph = startGlyph + classValue.len - 1;
1733
0
    if (glyphs->get_min () < startGlyph ||
1734
0
        glyphs->get_max () > end_glyph)
1735
0
      intersect_classes->add (0);
1736
1737
0
    for (const auto& _ : + hb_enumerate (classValue))
1738
0
    {
1739
0
      hb_codepoint_t g = startGlyph + _.first;
1740
0
      if (glyphs->has (g))
1741
0
        intersect_classes->add (_.second);
1742
0
    }
1743
0
  }
1744
1745
  protected:
1746
  HBUINT16  classFormat;  /* Format identifier--format = 1 */
1747
  typename Types::HBGlyphID
1748
     startGlyph;  /* First GlyphID of the classValueArray */
1749
  typename Types::template ArrayOf<HBUINT16>
1750
    classValue; /* Array of Class Values--one per GlyphID */
1751
  public:
1752
  DEFINE_SIZE_ARRAY (2 + 2 * Types::size, classValue);
1753
};
1754
1755
template <typename Types>
1756
struct ClassDefFormat2_4
1757
{
1758
  friend struct ClassDef;
1759
1760
  private:
1761
  unsigned int get_class (hb_codepoint_t glyph_id) const
1762
0
  {
1763
0
    return rangeRecord.bsearch (glyph_id).value;
1764
0
  }
1765
1766
  unsigned get_population () const
1767
0
  {
1768
0
    typename Types::large_int ret = 0;
1769
0
    for (const auto &r : rangeRecord)
1770
0
      ret += r.get_population ();
1771
0
    return ret > UINT_MAX ? UINT_MAX : (unsigned) ret;
1772
0
  }
1773
1774
  template<typename Iterator,
1775
     hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_t))>
1776
  bool serialize (hb_serialize_context_t *c,
1777
      Iterator it)
1778
0
  {
1779
0
    TRACE_SERIALIZE (this);
1780
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
1781
1782
0
    if (unlikely (!it))
1783
0
    {
1784
0
      classFormat = 2;
1785
0
      rangeRecord.len = 0;
1786
0
      return_trace (true);
1787
0
    }
1788
1789
0
    unsigned unsorted = false;
1790
0
    unsigned num_ranges = 1;
1791
0
    hb_codepoint_t prev_gid = (*it).first;
1792
0
    unsigned prev_klass = (*it).second;
1793
1794
0
    RangeRecord<Types> range_rec;
1795
0
    range_rec.first = prev_gid;
1796
0
    range_rec.last = prev_gid;
1797
0
    range_rec.value = prev_klass;
1798
1799
0
    auto *record = c->copy (range_rec);
1800
0
    if (unlikely (!record)) return_trace (false);
1801
1802
0
    for (const auto gid_klass_pair : + (++it))
1803
0
    {
1804
0
      hb_codepoint_t cur_gid = gid_klass_pair.first;
1805
0
      unsigned cur_klass = gid_klass_pair.second;
1806
1807
0
      if (cur_gid != prev_gid + 1 ||
1808
0
    cur_klass != prev_klass)
1809
0
      {
1810
1811
0
  if (unlikely (cur_gid < prev_gid))
1812
0
    unsorted = true;
1813
1814
0
  if (unlikely (!record)) break;
1815
0
  record->last = prev_gid;
1816
0
  num_ranges++;
1817
1818
0
  range_rec.first = cur_gid;
1819
0
  range_rec.last = cur_gid;
1820
0
  range_rec.value = cur_klass;
1821
1822
0
  record = c->copy (range_rec);
1823
0
      }
1824
1825
0
      prev_klass = cur_klass;
1826
0
      prev_gid = cur_gid;
1827
0
    }
1828
1829
0
    if (unlikely (c->in_error ())) return_trace (false);
1830
1831
0
    if (likely (record)) record->last = prev_gid;
1832
0
    rangeRecord.len = num_ranges;
1833
1834
0
    if (unlikely (unsorted))
1835
0
      rangeRecord.as_array ().qsort (RangeRecord<Types>::cmp_range);
1836
1837
0
    return_trace (true);
1838
0
  }
Unexecuted instantiation: hb-face.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-face.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shape.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-static.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI13hb_map_iter_tIS5_IS6_INS1_6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNSB_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKSB_11clone_rangeESD_jjEUljE0_RK3$_7LSG_0EEZNKSB_11clone_rangeESD_jjEUl9hb_pair_tIjjEE_LSF_1ELSG_0EESL_RK3$_6LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSW_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tIS5_I13hb_map_iter_tINS1_6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNSB_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNSB_6shrinkESD_jEUljE0_RK3$_7LSG_0EESL_RK3$_6LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSS_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSS_
Unexecuted instantiation: hb-subset.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_8RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI13hb_map_iter_tIS5_IS6_INS1_6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNSB_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKSB_11clone_rangeESD_jjEUljE0_RK3$_8LSG_0EEZNKSB_11clone_rangeESD_jjEUl9hb_pair_tIjjEE_LSF_1ELSG_0EESL_RK3$_5LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSW_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tIS5_I13hb_map_iter_tINS1_6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNSB_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNSB_6shrinkESD_jEUljE0_RK3$_8LSG_0EESL_RK3$_5LSG_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSS_18is_sorted_iteratorEvE4typeELSG_0EEEbP22hb_serialize_context_tSS_
Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-aat-map.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-font.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-font.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-metrics.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-var.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff1.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff2.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-cff1-table.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-ot-cff2-table.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-cff-common.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan-layout.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_5LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
Unexecuted instantiation: hb-subset-plan-var.cc:_ZN2OT17ClassDefFormat2_4INS_6Layout10SmallTypesEE9serializeI16hb_filter_iter_tI17hb_sorted_array_tIK9hb_pair_tIjjEERK3$_7RK3$_6LPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSK_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSK_
1839
1840
  bool subset (hb_subset_context_t *c,
1841
         hb_map_t *klass_map = nullptr /*OUT*/,
1842
               bool keep_empty_table = true,
1843
               bool use_class_zero = true,
1844
               const Coverage* glyph_filter = nullptr) const
1845
0
  {
1846
0
    TRACE_SUBSET (this);
1847
0
    const hb_map_t &glyph_map = c->plan->glyph_map_gsub;
1848
0
    const hb_set_t &glyph_set = *c->plan->glyphset_gsub ();
1849
1850
0
    hb_sorted_vector_t<hb_codepoint_pair_t> glyph_and_klass;
1851
0
    hb_set_t orig_klasses;
1852
1853
0
    if (glyph_set.get_population () * hb_bit_storage ((unsigned) rangeRecord.len)
1854
0
  < get_population ())
1855
0
    {
1856
0
      for (hb_codepoint_t g : glyph_set)
1857
0
      {
1858
0
  unsigned klass = get_class (g);
1859
0
  if (!klass) continue;
1860
0
  hb_codepoint_t new_gid = glyph_map[g];
1861
0
  if (new_gid == HB_MAP_VALUE_INVALID) continue;
1862
0
  if (glyph_filter && !glyph_filter->has (g)) continue;
1863
0
  glyph_and_klass.push (hb_pair (new_gid, klass));
1864
0
  orig_klasses.add (klass);
1865
0
      }
1866
0
    }
1867
0
    else
1868
0
    {
1869
0
      unsigned num_source_glyphs = c->plan->source->get_num_glyphs ();
1870
0
      for (auto &range : rangeRecord)
1871
0
      {
1872
0
  unsigned klass = range.value;
1873
0
  if (!klass) continue;
1874
0
  hb_codepoint_t start = range.first;
1875
0
  hb_codepoint_t end   = hb_min (range.last + 1, num_source_glyphs);
1876
0
  for (hb_codepoint_t g = start; g < end; g++)
1877
0
  {
1878
0
    hb_codepoint_t new_gid = glyph_map[g];
1879
0
    if (new_gid == HB_MAP_VALUE_INVALID) continue;
1880
0
    if (glyph_filter && !glyph_filter->has (g)) continue;
1881
1882
0
    glyph_and_klass.push (hb_pair (new_gid, klass));
1883
0
    orig_klasses.add (klass);
1884
0
  }
1885
0
      }
1886
0
    }
1887
1888
0
    const hb_set_t& glyphset = *c->plan->glyphset_gsub ();
1889
0
    unsigned glyph_count = glyph_filter
1890
0
                           ? hb_len (hb_iter (glyphset) | hb_filter (glyph_filter))
1891
0
                           : glyph_map.get_population ();
1892
0
    use_class_zero = use_class_zero && glyph_count <= glyph_and_klass.length;
1893
0
    if (!ClassDef_remap_and_serialize (c->serializer,
1894
0
                                       orig_klasses,
1895
0
                                       use_class_zero,
1896
0
                                       glyph_and_klass,
1897
0
                                       klass_map))
1898
0
      return_trace (false);
1899
0
    return_trace (keep_empty_table || (bool) glyph_and_klass);
1900
0
  }
Unexecuted instantiation: OT::ClassDefFormat2_4<OT::Layout::SmallTypes>::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
Unexecuted instantiation: OT::ClassDefFormat2_4<OT::Layout::SmallTypes>::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
1901
1902
  bool sanitize (hb_sanitize_context_t *c) const
1903
0
  {
1904
0
    TRACE_SANITIZE (this);
1905
0
    return_trace (rangeRecord.sanitize (c));
1906
0
  }
1907
1908
0
  unsigned cost () const { return hb_bit_storage ((unsigned) rangeRecord.len); /* bsearch cost */ }
1909
1910
  template <typename set_t>
1911
  bool collect_coverage (set_t *glyphs) const
1912
0
  {
1913
0
    for (auto &range : rangeRecord)
1914
0
      if (range.value)
1915
0
  if (unlikely (!range.collect_coverage (glyphs)))
1916
0
    return false;
1917
0
    return true;
1918
0
  }
1919
1920
  template <typename set_t>
1921
  bool collect_class (set_t *glyphs, unsigned int klass) const
1922
0
  {
1923
0
    for (auto &range : rangeRecord)
1924
0
    {
1925
0
      if (range.value == klass)
1926
0
  if (unlikely (!range.collect_coverage (glyphs)))
1927
0
    return false;
1928
0
    }
1929
0
    return true;
1930
0
  }
1931
1932
  bool intersects (const hb_set_t *glyphs) const
1933
0
  {
1934
0
    if (rangeRecord.len > glyphs->get_population () * hb_bit_storage ((unsigned) rangeRecord.len))
1935
0
    {
1936
0
      for (auto g : *glyphs)
1937
0
        if (get_class (g))
1938
0
    return true;
1939
0
      return false;
1940
0
    }
1941
1942
0
    return hb_any (+ hb_iter (rangeRecord)
1943
0
                   | hb_map ([glyphs] (const RangeRecord<Types> &range) { return range.intersects (*glyphs) && range.value; }));
1944
0
  }
1945
  bool intersects_class (const hb_set_t *glyphs, uint16_t klass) const
1946
0
  {
1947
0
    if (klass == 0)
1948
0
    {
1949
      /* Match if there's any glyph that is not listed! */
1950
0
      hb_codepoint_t g = HB_SET_VALUE_INVALID;
1951
0
      hb_codepoint_t last = HB_SET_VALUE_INVALID;
1952
0
      auto it = hb_iter (rangeRecord);
1953
0
      for (auto &range : it)
1954
0
      {
1955
0
        if (it->first == last + 1)
1956
0
  {
1957
0
    it++;
1958
0
    continue;
1959
0
  }
1960
1961
0
  if (!glyphs->next (&g))
1962
0
    break;
1963
0
  if (g < range.first)
1964
0
    return true;
1965
0
  g = range.last;
1966
0
  last = g;
1967
0
      }
1968
0
      if (g != HB_SET_VALUE_INVALID && glyphs->next (&g))
1969
0
  return true;
1970
      /* Fall through. */
1971
0
    }
1972
0
    for (const auto &range : rangeRecord)
1973
0
      if (range.value == klass && range.intersects (*glyphs))
1974
0
  return true;
1975
0
    return false;
1976
0
  }
1977
1978
  void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
1979
0
  {
1980
0
    if (klass == 0)
1981
0
    {
1982
0
      hb_codepoint_t g = HB_SET_VALUE_INVALID;
1983
0
      for (auto &range : rangeRecord)
1984
0
      {
1985
0
  if (!glyphs->next (&g))
1986
0
    goto done;
1987
0
  while (g < range.first)
1988
0
  {
1989
0
    intersect_glyphs->add (g);
1990
0
    if (!glyphs->next (&g))
1991
0
      goto done;
1992
0
        }
1993
0
        g = range.last;
1994
0
      }
1995
0
      while (glyphs->next (&g))
1996
0
  intersect_glyphs->add (g);
1997
0
      done:
1998
1999
0
      return;
2000
0
    }
2001
2002
0
    unsigned count = rangeRecord.len;
2003
0
    if (count > glyphs->get_population () * hb_bit_storage (count))
2004
0
    {
2005
0
      for (auto g : *glyphs)
2006
0
      {
2007
0
        unsigned i;
2008
0
        if (rangeRecord.as_array ().bfind (g, &i) &&
2009
0
      rangeRecord.arrayZ[i].value == klass)
2010
0
    intersect_glyphs->add (g);
2011
0
      }
2012
0
      return;
2013
0
    }
2014
2015
0
    for (auto &range : rangeRecord)
2016
0
    {
2017
0
      if (range.value != klass) continue;
2018
2019
0
      unsigned end = range.last + 1;
2020
0
      for (hb_codepoint_t g = range.first - 1;
2021
0
     glyphs->next (&g) && g < end;)
2022
0
  intersect_glyphs->add (g);
2023
0
    }
2024
0
  }
2025
2026
  void intersected_classes (const hb_set_t *glyphs, hb_set_t *intersect_classes) const
2027
0
  {
2028
0
    if (glyphs->is_empty ()) return;
2029
2030
0
    hb_codepoint_t g = HB_SET_VALUE_INVALID;
2031
0
    for (auto &range : rangeRecord)
2032
0
    {
2033
0
      if (!glyphs->next (&g))
2034
0
        break;
2035
0
      if (g < range.first)
2036
0
      {
2037
0
        intersect_classes->add (0);
2038
0
        break;
2039
0
      }
2040
0
      g = range.last;
2041
0
    }
2042
0
    if (g != HB_SET_VALUE_INVALID && glyphs->next (&g))
2043
0
      intersect_classes->add (0);
2044
2045
0
    for (const auto& range : rangeRecord)
2046
0
      if (range.intersects (*glyphs))
2047
0
        intersect_classes->add (range.value);
2048
0
  }
Unexecuted instantiation: OT::ClassDefFormat2_4<OT::Layout::SmallTypes>::intersected_classes(hb_set_t const*, hb_set_t*) const
Unexecuted instantiation: OT::ClassDefFormat2_4<OT::Layout::SmallTypes>::intersected_classes(hb_set_t const*, hb_set_t*) const
2049
2050
  protected:
2051
  HBUINT16  classFormat;  /* Format identifier--format = 2 */
2052
  typename Types::template SortedArrayOf<RangeRecord<Types>>
2053
    rangeRecord;  /* Array of glyph ranges--ordered by
2054
         * Start GlyphID */
2055
  public:
2056
  DEFINE_SIZE_ARRAY (2 + Types::size, rangeRecord);
2057
};
2058
2059
struct ClassDef
2060
{
2061
  /* Has interface. */
2062
0
  unsigned operator [] (hb_codepoint_t k) const { return get (k); }
2063
0
  bool has (hb_codepoint_t k) const { return (*this)[k]; }
2064
  /* Projection. */
2065
0
  hb_codepoint_t operator () (hb_codepoint_t k) const { return get (k); }
2066
2067
0
  unsigned int get (hb_codepoint_t k) const { return get_class (k); }
2068
  unsigned int get_class (hb_codepoint_t glyph_id) const
2069
0
  {
2070
0
    switch (u.format) {
2071
0
    case 1: hb_barrier (); return u.format1.get_class (glyph_id);
2072
0
    case 2: hb_barrier (); return u.format2.get_class (glyph_id);
2073
#ifndef HB_NO_BEYOND_64K
2074
    case 3: hb_barrier (); return u.format3.get_class (glyph_id);
2075
    case 4: hb_barrier (); return u.format4.get_class (glyph_id);
2076
#endif
2077
0
    default:return 0;
2078
0
    }
2079
0
  }
2080
  unsigned int get_class (hb_codepoint_t glyph_id,
2081
        hb_ot_lookup_cache_t *cache) const
2082
0
  {
2083
0
    unsigned klass;
2084
0
    if (cache && cache->get (glyph_id, &klass)) return klass;
2085
0
    klass = get_class (glyph_id);
2086
0
    if (cache) cache->set (glyph_id, klass);
2087
0
    return klass;
2088
0
  }
2089
2090
  unsigned get_population () const
2091
0
  {
2092
0
    switch (u.format) {
2093
0
    case 1: hb_barrier (); return u.format1.get_population ();
2094
0
    case 2: hb_barrier (); return u.format2.get_population ();
2095
0
#ifndef HB_NO_BEYOND_64K
2096
0
    case 3: hb_barrier (); return u.format3.get_population ();
2097
0
    case 4: hb_barrier (); return u.format4.get_population ();
2098
0
#endif
2099
0
    default:return NOT_COVERED;
2100
0
    }
2101
0
  }
2102
2103
  template<typename Iterator,
2104
     hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_t))>
2105
  bool serialize (hb_serialize_context_t *c, Iterator it_with_class_zero)
2106
0
  {
2107
0
    TRACE_SERIALIZE (this);
2108
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
2109
2110
0
    auto it = + it_with_class_zero | hb_filter (hb_second);
2111
2112
0
    unsigned format = 2;
2113
0
    hb_codepoint_t glyph_max = 0;
2114
0
    if (likely (it))
2115
0
    {
2116
0
      hb_codepoint_t glyph_min = (*it).first;
2117
0
      glyph_max = glyph_min;
2118
2119
0
      unsigned num_glyphs = 0;
2120
0
      unsigned num_ranges = 1;
2121
0
      hb_codepoint_t prev_gid = glyph_min;
2122
0
      unsigned prev_klass = (*it).second;
2123
2124
0
      for (const auto gid_klass_pair : it)
2125
0
      {
2126
0
  hb_codepoint_t cur_gid = gid_klass_pair.first;
2127
0
  unsigned cur_klass = gid_klass_pair.second;
2128
0
        num_glyphs++;
2129
0
  if (cur_gid == glyph_min) continue;
2130
0
        if (cur_gid > glyph_max) glyph_max = cur_gid;
2131
0
  if (cur_gid != prev_gid + 1 ||
2132
0
      cur_klass != prev_klass)
2133
0
    num_ranges++;
2134
2135
0
  prev_gid = cur_gid;
2136
0
  prev_klass = cur_klass;
2137
0
      }
2138
2139
0
      if (num_glyphs && 1 + (glyph_max - glyph_min + 1) <= num_ranges * 3)
2140
0
  format = 1;
2141
0
    }
2142
2143
#ifndef HB_NO_BEYOND_64K
2144
    if (glyph_max > 0xFFFFu)
2145
      u.format += 2;
2146
    if (unlikely (glyph_max > 0xFFFFFFu))
2147
#else
2148
0
    if (unlikely (glyph_max > 0xFFFFu))
2149
0
#endif
2150
0
    {
2151
0
      c->check_success (false, HB_SERIALIZE_ERROR_INT_OVERFLOW);
2152
0
      return_trace (false);
2153
0
    }
2154
2155
0
    u.format = format;
2156
2157
0
    switch (u.format)
2158
0
    {
2159
0
    case 1: hb_barrier (); return_trace (u.format1.serialize (c, it));
2160
0
    case 2: hb_barrier (); return_trace (u.format2.serialize (c, it));
2161
#ifndef HB_NO_BEYOND_64K
2162
    case 3: hb_barrier (); return_trace (u.format3.serialize (c, it));
2163
    case 4: hb_barrier (); return_trace (u.format4.serialize (c, it));
2164
#endif
2165
0
    default:return_trace (false);
2166
0
    }
2167
0
  }
Unexecuted instantiation: _ZN2OT8ClassDef9serializeI17hb_sorted_array_tIK9hb_pair_tIjjEETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS8_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tS8_
Unexecuted instantiation: hb-subset.cc:_ZN2OT8ClassDef9serializeI13hb_map_iter_tI16hb_filter_iter_tIS2_INS_6Layout6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNS9_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKS9_11clone_rangeESB_jjEUljE0_RK3$_7LSE_0EEZNKS9_11clone_rangeESB_jjEUl9hb_pair_tIjjEE_LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSQ_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tSQ_
Unexecuted instantiation: hb-subset.cc:_ZN2OT8ClassDef9serializeI16hb_filter_iter_tI13hb_map_iter_tINS_6Layout6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNS9_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNS9_6shrinkESB_jEUljE0_RK3$_7LSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSM_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tSM_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT8ClassDef9serializeI13hb_map_iter_tI16hb_filter_iter_tIS2_INS_6Layout6Common8Coverage6iter_tEZNK5graph14PairPosFormat211clone_rangeERNS9_15split_context_tEjjEUljE_L24hb_function_sortedness_t1ELPv0EEZNKS9_11clone_rangeESB_jjEUljE0_RK3$_8LSE_0EEZNKS9_11clone_rangeESB_jjEUl9hb_pair_tIjjEE_LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSQ_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tSQ_
Unexecuted instantiation: gsubgpos-context.cc:_ZN2OT8ClassDef9serializeI16hb_filter_iter_tI13hb_map_iter_tINS_6Layout6Common8Coverage6iter_tEZN5graph14PairPosFormat26shrinkERNS9_15split_context_tEjEUljE_L24hb_function_sortedness_t1ELPv0EEZNS9_6shrinkESB_jEUljE0_RK3$_8LSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSM_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tSM_
Unexecuted instantiation: _ZN2OT8ClassDef9serializeI17hb_sorted_array_tIK9hb_pair_tIjjEETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS8_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tS8_
2168
2169
  bool subset (hb_subset_context_t *c,
2170
         hb_map_t *klass_map = nullptr /*OUT*/,
2171
               bool keep_empty_table = true,
2172
               bool use_class_zero = true,
2173
               const Coverage* glyph_filter = nullptr) const
2174
0
  {
2175
0
    TRACE_SUBSET (this);
2176
0
    switch (u.format) {
2177
0
    case 1: hb_barrier (); return_trace (u.format1.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2178
0
    case 2: hb_barrier (); return_trace (u.format2.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2179
#ifndef HB_NO_BEYOND_64K
2180
    case 3: hb_barrier (); return_trace (u.format3.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2181
    case 4: hb_barrier (); return_trace (u.format4.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2182
#endif
2183
0
    default:return_trace (false);
2184
0
    }
2185
0
  }
Unexecuted instantiation: OT::ClassDef::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
Unexecuted instantiation: OT::ClassDef::subset(hb_subset_context_t*, hb_map_t*, bool, bool, OT::Layout::Common::Coverage const*) const
2186
2187
  bool sanitize (hb_sanitize_context_t *c) const
2188
0
  {
2189
0
    TRACE_SANITIZE (this);
2190
0
    if (!u.format.sanitize (c)) return_trace (false);
2191
0
    hb_barrier ();
2192
0
    switch (u.format) {
2193
0
    case 1: hb_barrier (); return_trace (u.format1.sanitize (c));
2194
0
    case 2: hb_barrier (); return_trace (u.format2.sanitize (c));
2195
#ifndef HB_NO_BEYOND_64K
2196
    case 3: hb_barrier (); return_trace (u.format3.sanitize (c));
2197
    case 4: hb_barrier (); return_trace (u.format4.sanitize (c));
2198
#endif
2199
0
    default:return_trace (true);
2200
0
    }
2201
0
  }
2202
2203
  unsigned cost () const
2204
0
  {
2205
0
    switch (u.format) {
2206
0
    case 1: hb_barrier (); return u.format1.cost ();
2207
0
    case 2: hb_barrier (); return u.format2.cost ();
2208
#ifndef HB_NO_BEYOND_64K
2209
    case 3: hb_barrier (); return u.format3.cost ();
2210
    case 4: hb_barrier (); return u.format4.cost ();
2211
#endif
2212
0
    default:return 0u;
2213
0
    }
2214
0
  }
2215
2216
  /* Might return false if array looks unsorted.
2217
   * Used for faster rejection of corrupt data. */
2218
  template <typename set_t>
2219
  bool collect_coverage (set_t *glyphs) const
2220
0
  {
2221
0
    switch (u.format) {
2222
0
    case 1: hb_barrier (); return u.format1.collect_coverage (glyphs);
2223
0
    case 2: hb_barrier (); return u.format2.collect_coverage (glyphs);
2224
#ifndef HB_NO_BEYOND_64K
2225
    case 3: hb_barrier (); return u.format3.collect_coverage (glyphs);
2226
    case 4: hb_barrier (); return u.format4.collect_coverage (glyphs);
2227
#endif
2228
0
    default:return false;
2229
0
    }
2230
0
  }
2231
2232
  /* Might return false if array looks unsorted.
2233
   * Used for faster rejection of corrupt data. */
2234
  template <typename set_t>
2235
  bool collect_class (set_t *glyphs, unsigned int klass) const
2236
0
  {
2237
0
    switch (u.format) {
2238
0
    case 1: hb_barrier (); return u.format1.collect_class (glyphs, klass);
2239
0
    case 2: hb_barrier (); return u.format2.collect_class (glyphs, klass);
2240
#ifndef HB_NO_BEYOND_64K
2241
    case 3: hb_barrier (); return u.format3.collect_class (glyphs, klass);
2242
    case 4: hb_barrier (); return u.format4.collect_class (glyphs, klass);
2243
#endif
2244
0
    default:return false;
2245
0
    }
2246
0
  }
2247
2248
  bool intersects (const hb_set_t *glyphs) const
2249
0
  {
2250
0
    switch (u.format) {
2251
0
    case 1: hb_barrier (); return u.format1.intersects (glyphs);
2252
0
    case 2: hb_barrier (); return u.format2.intersects (glyphs);
2253
#ifndef HB_NO_BEYOND_64K
2254
    case 3: hb_barrier (); return u.format3.intersects (glyphs);
2255
    case 4: hb_barrier (); return u.format4.intersects (glyphs);
2256
#endif
2257
0
    default:return false;
2258
0
    }
2259
0
  }
2260
  bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const
2261
0
  {
2262
0
    switch (u.format) {
2263
0
    case 1: hb_barrier (); return u.format1.intersects_class (glyphs, klass);
2264
0
    case 2: hb_barrier (); return u.format2.intersects_class (glyphs, klass);
2265
#ifndef HB_NO_BEYOND_64K
2266
    case 3: hb_barrier (); return u.format3.intersects_class (glyphs, klass);
2267
    case 4: hb_barrier (); return u.format4.intersects_class (glyphs, klass);
2268
#endif
2269
0
    default:return false;
2270
0
    }
2271
0
  }
2272
2273
  void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
2274
0
  {
2275
0
    switch (u.format) {
2276
0
    case 1: hb_barrier (); return u.format1.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2277
0
    case 2: hb_barrier (); return u.format2.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2278
#ifndef HB_NO_BEYOND_64K
2279
    case 3: hb_barrier (); return u.format3.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2280
    case 4: hb_barrier (); return u.format4.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2281
#endif
2282
0
    default:return;
2283
0
    }
2284
0
  }
2285
2286
  void intersected_classes (const hb_set_t *glyphs, hb_set_t *intersect_classes) const
2287
0
  {
2288
0
    switch (u.format) {
2289
0
    case 1: hb_barrier (); return u.format1.intersected_classes (glyphs, intersect_classes);
2290
0
    case 2: hb_barrier (); return u.format2.intersected_classes (glyphs, intersect_classes);
2291
#ifndef HB_NO_BEYOND_64K
2292
    case 3: hb_barrier (); return u.format3.intersected_classes (glyphs, intersect_classes);
2293
    case 4: hb_barrier (); return u.format4.intersected_classes (glyphs, intersect_classes);
2294
#endif
2295
0
    default:return;
2296
0
    }
2297
0
  }
2298
2299
2300
  protected:
2301
  union {
2302
  HBUINT16      format;   /* Format identifier */
2303
  ClassDefFormat1_3<SmallTypes> format1;
2304
  ClassDefFormat2_4<SmallTypes> format2;
2305
#ifndef HB_NO_BEYOND_64K
2306
  ClassDefFormat1_3<MediumTypes>format3;
2307
  ClassDefFormat2_4<MediumTypes>format4;
2308
#endif
2309
  } u;
2310
  public:
2311
  DEFINE_SIZE_UNION (2, format);
2312
};
2313
2314
template<typename Iterator>
2315
static inline bool ClassDef_serialize (hb_serialize_context_t *c,
2316
               Iterator it)
2317
0
{ return (c->start_embed<ClassDef> ()->serialize (c, it)); }
Unexecuted instantiation: hb-face.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-face.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-shape.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-shaper-arabic.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-static.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset.cc:bool OT::ClassDef_serialize<hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#2}, $_7 const&, (hb_function_sortedness_t)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(hb_pair_t<unsigned int, unsigned int>)#1}, (graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1})1, (hb_function_sortedness_t)0> >(hb_serialize_context_t*, hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#2}, $_7 const&, (hb_function_sortedness_t)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(hb_pair_t<unsigned int, unsigned int>)#1}, (graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1})1, (hb_function_sortedness_t)0>)
Unexecuted instantiation: hb-subset.cc:bool OT::ClassDef_serialize<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#2}, $_7 const&, (hb_function_sortedness_t)0> >(hb_serialize_context_t*, hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#2}, $_7 const&, (hb_function_sortedness_t)0>)
Unexecuted instantiation: hb-subset.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: gsubgpos-context.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: gsubgpos-context.cc:bool OT::ClassDef_serialize<hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#2}, $_8 const&, (hb_function_sortedness_t)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(hb_pair_t<unsigned int, unsigned int>)#1}, (graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1})1, (hb_function_sortedness_t)0> >(hb_serialize_context_t*, hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#2}, $_8 const&, (hb_function_sortedness_t)0>, graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(hb_pair_t<unsigned int, unsigned int>)#1}, (graph::PairPosFormat2::clone_range(graph::PairPosFormat2::split_context_t&, unsigned int, unsigned int) const::{lambda(unsigned int)#1})1, (hb_function_sortedness_t)0>)
Unexecuted instantiation: gsubgpos-context.cc:bool OT::ClassDef_serialize<hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#2}, $_8 const&, (hb_function_sortedness_t)0> >(hb_serialize_context_t*, hb_filter_iter_t<hb_map_iter_t<OT::Layout::Common::Coverage::iter_t, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#1}, (hb_function_sortedness_t)1, (void*)0>, graph::PairPosFormat2::shrink(graph::PairPosFormat2::split_context_t&, unsigned int)::{lambda(unsigned int)#2}, $_8 const&, (hb_function_sortedness_t)0>)
Unexecuted instantiation: hb-aat-layout.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-aat-map.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-font.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-font.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-layout.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-metrics.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-shape-fallback.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-var.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-cff1.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-cff2.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-plan.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-cff1-table.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-ot-cff2-table.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-cff-common.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-plan-layout.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
Unexecuted instantiation: hb-subset-plan-var.cc:bool OT::ClassDef_serialize<hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const> >(hb_serialize_context_t*, hb_sorted_array_t<hb_pair_t<unsigned int, unsigned int> const>)
2318
2319
2320
/*
2321
 * Item Variation Store
2322
 */
2323
2324
/* ported from fonttools (class _Encoding) */
2325
struct delta_row_encoding_t
2326
{
2327
  /* each byte represents a region, value is one of 0/1/2/4, which means bytes
2328
   * needed for this region */
2329
  hb_vector_t<uint8_t> chars;
2330
  unsigned width = 0;
2331
  hb_vector_t<uint8_t> columns;
2332
  unsigned overhead = 0;
2333
  hb_vector_t<const hb_vector_t<int>*> items;
2334
2335
0
  delta_row_encoding_t () = default;
2336
  delta_row_encoding_t (hb_vector_t<uint8_t>&& chars_,
2337
                        const hb_vector_t<int>* row = nullptr) :
2338
0
                        delta_row_encoding_t ()
2339
2340
0
  {
2341
0
    chars = std::move (chars_);
2342
0
    width = get_width ();
2343
0
    columns = get_columns ();
2344
0
    overhead = get_chars_overhead (columns);
2345
0
    if (row) items.push (row);
2346
0
  }
2347
2348
  bool is_empty () const
2349
0
  { return !items; }
2350
2351
  static hb_vector_t<uint8_t> get_row_chars (const hb_vector_t<int>& row)
2352
0
  {
2353
0
    hb_vector_t<uint8_t> ret;
2354
0
    if (!ret.alloc (row.length)) return ret;
2355
2356
0
    bool long_words = false;
2357
2358
    /* 0/1/2 byte encoding */
2359
0
    for (int i = row.length - 1; i >= 0; i--)
2360
0
    {
2361
0
      int v =  row.arrayZ[i];
2362
0
      if (v == 0)
2363
0
        ret.push (0);
2364
0
      else if (v > 32767 || v < -32768)
2365
0
      {
2366
0
        long_words = true;
2367
0
        break;
2368
0
      }
2369
0
      else if (v > 127 || v < -128)
2370
0
        ret.push (2);
2371
0
      else
2372
0
        ret.push (1);
2373
0
    }
2374
2375
0
    if (!long_words)
2376
0
      return ret;
2377
2378
    /* redo, 0/2/4 bytes encoding */
2379
0
    ret.reset ();
2380
0
    for (int i = row.length - 1; i >= 0; i--)
2381
0
    {
2382
0
      int v =  row.arrayZ[i];
2383
0
      if (v == 0)
2384
0
        ret.push (0);
2385
0
      else if (v > 32767 || v < -32768)
2386
0
        ret.push (4);
2387
0
      else
2388
0
        ret.push (2);
2389
0
    }
2390
0
    return ret;
2391
0
  }
2392
2393
  inline unsigned get_width ()
2394
0
  {
2395
0
    unsigned ret = + hb_iter (chars)
2396
0
                   | hb_reduce (hb_add, 0u)
2397
0
                   ;
2398
0
    return ret;
2399
0
  }
2400
2401
  hb_vector_t<uint8_t> get_columns ()
2402
0
  {
2403
0
    hb_vector_t<uint8_t> cols;
2404
0
    cols.alloc (chars.length);
2405
0
    for (auto v : chars)
2406
0
    {
2407
0
      uint8_t flag = v ? 1 : 0;
2408
0
      cols.push (flag);
2409
0
    }
2410
0
    return cols;
2411
0
  }
2412
2413
  static inline unsigned get_chars_overhead (const hb_vector_t<uint8_t>& cols)
2414
0
  {
2415
0
    unsigned c = 4 + 6; // 4 bytes for LOffset, 6 bytes for VarData header
2416
0
    unsigned cols_bit_count = 0;
2417
0
    for (auto v : cols)
2418
0
      if (v) cols_bit_count++;
2419
0
    return c + cols_bit_count * 2;
2420
0
  }
2421
2422
  unsigned get_gain () const
2423
0
  {
2424
0
    int count = items.length;
2425
0
    return hb_max (0, (int) overhead - count);
2426
0
  }
2427
2428
  int gain_from_merging (const delta_row_encoding_t& other_encoding) const
2429
0
  {
2430
0
    int combined_width = 0;
2431
0
    for (unsigned i = 0; i < chars.length; i++)
2432
0
      combined_width += hb_max (chars.arrayZ[i], other_encoding.chars.arrayZ[i]);
2433
2434
0
    hb_vector_t<uint8_t> combined_columns;
2435
0
    combined_columns.alloc (columns.length);
2436
0
    for (unsigned i = 0; i < columns.length; i++)
2437
0
      combined_columns.push (columns.arrayZ[i] | other_encoding.columns.arrayZ[i]);
2438
2439
0
    int combined_overhead = get_chars_overhead (combined_columns);
2440
0
    int combined_gain = (int) overhead + (int) other_encoding.overhead - combined_overhead
2441
0
                        - (combined_width - (int) width) * items.length
2442
0
                        - (combined_width - (int) other_encoding.width) * other_encoding.items.length;
2443
2444
0
    return combined_gain;
2445
0
  }
2446
2447
  static int cmp (const void *pa, const void *pb)
2448
0
  {
2449
0
    const delta_row_encoding_t *a = (const delta_row_encoding_t *)pa;
2450
0
    const delta_row_encoding_t *b = (const delta_row_encoding_t *)pb;
2451
2452
0
    int gain_a = a->get_gain ();
2453
0
    int gain_b = b->get_gain ();
2454
2455
0
    if (gain_a != gain_b)
2456
0
      return gain_a - gain_b;
2457
2458
0
    return (b->chars).as_array ().cmp ((a->chars).as_array ());
2459
0
  }
2460
2461
  static int cmp_width (const void *pa, const void *pb)
2462
0
  {
2463
0
    const delta_row_encoding_t *a = (const delta_row_encoding_t *)pa;
2464
0
    const delta_row_encoding_t *b = (const delta_row_encoding_t *)pb;
2465
2466
0
    if (a->width != b->width)
2467
0
      return (int) a->width - (int) b->width;
2468
2469
0
    return (b->chars).as_array ().cmp ((a->chars).as_array ());
2470
0
  }
2471
2472
  bool add_row (const hb_vector_t<int>* row)
2473
0
  { return items.push (row); }
2474
};
2475
2476
struct VarRegionAxis
2477
{
2478
  float evaluate (int coord) const
2479
0
  {
2480
0
    int peak = peakCoord.to_int ();
2481
0
    if (peak == 0 || coord == peak)
2482
0
      return 1.f;
2483
0
    else if (coord == 0) // Faster
2484
0
      return 0.f;
2485
2486
0
    int start = startCoord.to_int (), end = endCoord.to_int ();
2487
2488
    /* TODO Move these to sanitize(). */
2489
0
    if (unlikely (start > peak || peak > end))
2490
0
      return 1.f;
2491
0
    if (unlikely (start < 0 && end > 0 && peak != 0))
2492
0
      return 1.f;
2493
2494
0
    if (coord <= start || end <= coord)
2495
0
      return 0.f;
2496
2497
    /* Interpolate */
2498
0
    if (coord < peak)
2499
0
      return float (coord - start) / (peak - start);
2500
0
    else
2501
0
      return float (end - coord) / (end - peak);
2502
0
  }
2503
2504
  bool sanitize (hb_sanitize_context_t *c) const
2505
0
  {
2506
0
    TRACE_SANITIZE (this);
2507
0
    return_trace (c->check_struct (this));
2508
0
  }
2509
2510
  bool serialize (hb_serialize_context_t *c) const
2511
0
  {
2512
0
    TRACE_SERIALIZE (this);
2513
0
    return_trace (c->embed (this));
2514
0
  }
Unexecuted instantiation: OT::VarRegionAxis::serialize(hb_serialize_context_t*) const
Unexecuted instantiation: OT::VarRegionAxis::serialize(hb_serialize_context_t*) const
2515
2516
  public:
2517
  F2DOT14 startCoord;
2518
  F2DOT14 peakCoord;
2519
  F2DOT14 endCoord;
2520
  public:
2521
  DEFINE_SIZE_STATIC (6);
2522
};
2523
struct SparseVarRegionAxis
2524
{
2525
  float evaluate (const int *coords, unsigned int coord_len) const
2526
0
  {
2527
0
    unsigned i = axisIndex;
2528
0
    int coord = i < coord_len ? coords[i] : 0;
2529
0
    return axis.evaluate (coord);
2530
0
  }
2531
2532
  bool sanitize (hb_sanitize_context_t *c) const
2533
0
  {
2534
0
    TRACE_SANITIZE (this);
2535
0
    return_trace (c->check_struct (this));
2536
0
  }
2537
2538
  bool serialize (hb_serialize_context_t *c) const
2539
0
  {
2540
0
    TRACE_SERIALIZE (this);
2541
0
    return_trace (c->embed (this));
2542
0
  }
2543
2544
  public:
2545
  HBUINT16 axisIndex;
2546
  VarRegionAxis axis;
2547
  public:
2548
  DEFINE_SIZE_STATIC (8);
2549
};
2550
2551
0
#define REGION_CACHE_ITEM_CACHE_INVALID INT_MIN
2552
0
#define REGION_CACHE_ITEM_MULTIPLIER (float (1 << ((sizeof (int) * 8) - 2)))
2553
0
#define REGION_CACHE_ITEM_DIVISOR (1.f / float (1 << ((sizeof (int) * 8) - 2)))
2554
2555
struct VarRegionList
2556
{
2557
  using cache_t = hb_atomic_t<int>;
2558
2559
  float evaluate (unsigned int region_index,
2560
      const int *coords, unsigned int coord_len,
2561
      cache_t *cache = nullptr) const
2562
0
  {
2563
0
    if (unlikely (region_index >= regionCount))
2564
0
      return 0.;
2565
2566
0
    cache_t *cached_value = nullptr;
2567
0
    if (cache)
2568
0
    {
2569
0
      cached_value = &(cache[region_index]);
2570
0
      if (*cached_value != REGION_CACHE_ITEM_CACHE_INVALID)
2571
0
  return *cached_value * REGION_CACHE_ITEM_DIVISOR;
2572
0
    }
2573
2574
0
    const VarRegionAxis *axes = axesZ.arrayZ + (region_index * axisCount);
2575
2576
0
    float v = 1.;
2577
0
    unsigned int count = axisCount;
2578
0
    for (unsigned int i = 0; i < count; i++)
2579
0
    {
2580
0
      int coord = i < coord_len ? coords[i] : 0;
2581
0
      float factor = axes[i].evaluate (coord);
2582
0
      if (factor == 0.f)
2583
0
      {
2584
0
        if (cache)
2585
0
    *cached_value = 0.;
2586
0
  return 0.;
2587
0
      }
2588
0
      v *= factor;
2589
0
    }
2590
2591
0
    if (cache)
2592
0
      *cached_value = v * REGION_CACHE_ITEM_MULTIPLIER;
2593
0
    return v;
2594
0
  }
2595
2596
  bool sanitize (hb_sanitize_context_t *c) const
2597
0
  {
2598
0
    TRACE_SANITIZE (this);
2599
0
    return_trace (c->check_struct (this) &&
2600
0
      hb_barrier () &&
2601
0
      axesZ.sanitize (c, axisCount * regionCount));
2602
0
  }
2603
2604
  bool serialize (hb_serialize_context_t *c,
2605
                  const hb_vector_t<hb_tag_t>& axis_tags,
2606
                  const hb_vector_t<const hb_hashmap_t<hb_tag_t, Triple>*>& regions)
2607
0
  {
2608
0
    TRACE_SERIALIZE (this);
2609
0
    unsigned axis_count = axis_tags.length;
2610
0
    unsigned region_count = regions.length;
2611
0
    if (!axis_count || !region_count) return_trace (false);
2612
0
    if (unlikely (hb_unsigned_mul_overflows (axis_count * region_count,
2613
0
                                             VarRegionAxis::static_size))) return_trace (false);
2614
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
2615
0
    axisCount = axis_count;
2616
0
    regionCount = region_count;
2617
2618
0
    for (unsigned r = 0; r < region_count; r++)
2619
0
    {
2620
0
      const auto& region = regions[r];
2621
0
      for (unsigned i = 0; i < axis_count; i++)
2622
0
      {
2623
0
        hb_tag_t tag = axis_tags.arrayZ[i];
2624
0
        VarRegionAxis var_region_rec;
2625
0
        Triple *coords;
2626
0
        if (region->has (tag, &coords))
2627
0
        {
2628
0
          var_region_rec.startCoord.set_float (coords->minimum);
2629
0
          var_region_rec.peakCoord.set_float (coords->middle);
2630
0
          var_region_rec.endCoord.set_float (coords->maximum);
2631
0
        }
2632
0
        else
2633
0
        {
2634
0
          var_region_rec.startCoord.set_int (0);
2635
0
          var_region_rec.peakCoord.set_int (0);
2636
0
          var_region_rec.endCoord.set_int (0);
2637
0
        }
2638
0
        if (!var_region_rec.serialize (c))
2639
0
          return_trace (false);
2640
0
      }
2641
0
    }
2642
0
    return_trace (true);
2643
0
  }
Unexecuted instantiation: OT::VarRegionList::serialize(hb_serialize_context_t*, hb_vector_t<unsigned int, false> const&, hb_vector_t<hb_hashmap_t<unsigned int, Triple, false> const*, false> const&)
Unexecuted instantiation: OT::VarRegionList::serialize(hb_serialize_context_t*, hb_vector_t<unsigned int, false> const&, hb_vector_t<hb_hashmap_t<unsigned int, Triple, false> const*, false> const&)
2644
2645
  bool serialize (hb_serialize_context_t *c, const VarRegionList *src, const hb_inc_bimap_t &region_map)
2646
0
  {
2647
0
    TRACE_SERIALIZE (this);
2648
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
2649
0
    axisCount = src->axisCount;
2650
0
    regionCount = region_map.get_population ();
2651
0
    if (unlikely (hb_unsigned_mul_overflows (axisCount * regionCount,
2652
0
               VarRegionAxis::static_size))) return_trace (false);
2653
0
    if (unlikely (!c->extend (this))) return_trace (false);
2654
0
    unsigned int region_count = src->regionCount;
2655
0
    for (unsigned int r = 0; r < regionCount; r++)
2656
0
    {
2657
0
      unsigned int backward = region_map.backward (r);
2658
0
      if (backward >= region_count) return_trace (false);
2659
0
      hb_memcpy (&axesZ[axisCount * r], &src->axesZ[axisCount * backward], VarRegionAxis::static_size * axisCount);
2660
0
    }
2661
2662
0
    return_trace (true);
2663
0
  }
Unexecuted instantiation: OT::VarRegionList::serialize(hb_serialize_context_t*, OT::VarRegionList const*, hb_inc_bimap_t const&)
Unexecuted instantiation: OT::VarRegionList::serialize(hb_serialize_context_t*, OT::VarRegionList const*, hb_inc_bimap_t const&)
2664
2665
  bool get_var_region (unsigned region_index,
2666
                       const hb_map_t& axes_old_index_tag_map,
2667
                       hb_hashmap_t<hb_tag_t, Triple>& axis_tuples /* OUT */) const
2668
0
  {
2669
0
    if (region_index >= regionCount) return false;
2670
0
    const VarRegionAxis* axis_region = axesZ.arrayZ + (region_index * axisCount);
2671
0
    for (unsigned i = 0; i < axisCount; i++)
2672
0
    {
2673
0
      hb_tag_t *axis_tag;
2674
0
      if (!axes_old_index_tag_map.has (i, &axis_tag))
2675
0
        return false;
2676
2677
0
      float min_val = axis_region->startCoord.to_float ();
2678
0
      float def_val = axis_region->peakCoord.to_float ();
2679
0
      float max_val = axis_region->endCoord.to_float ();
2680
2681
0
      if (def_val != 0.f)
2682
0
        axis_tuples.set (*axis_tag, Triple ((double) min_val, (double) def_val, (double) max_val));
2683
0
      axis_region++;
2684
0
    }
2685
0
    return !axis_tuples.in_error ();
2686
0
  }
2687
2688
  bool get_var_regions (const hb_map_t& axes_old_index_tag_map,
2689
                        hb_vector_t<hb_hashmap_t<hb_tag_t, Triple>>& regions /* OUT */) const
2690
0
  {
2691
0
    if (!regions.alloc (regionCount))
2692
0
      return false;
2693
2694
0
    for (unsigned i = 0; i < regionCount; i++)
2695
0
    {
2696
0
      hb_hashmap_t<hb_tag_t, Triple> axis_tuples;
2697
0
      if (!get_var_region (i, axes_old_index_tag_map, axis_tuples))
2698
0
        return false;
2699
0
      regions.push (std::move (axis_tuples));
2700
0
    }
2701
0
    return !regions.in_error ();
2702
0
  }
2703
2704
0
  unsigned int get_size () const { return min_size + VarRegionAxis::static_size * axisCount * regionCount; }
2705
2706
  public:
2707
  HBUINT16  axisCount;
2708
  HBUINT15  regionCount;
2709
  protected:
2710
  UnsizedArrayOf<VarRegionAxis>
2711
    axesZ;
2712
  public:
2713
  DEFINE_SIZE_ARRAY (4, axesZ);
2714
};
2715
2716
struct SparseVariationRegion : Array16Of<SparseVarRegionAxis>
2717
{
2718
  float evaluate (const int *coords, unsigned int coord_len) const
2719
0
  {
2720
0
    float v = 1.f;
2721
0
    unsigned int count = len;
2722
0
    for (unsigned int i = 0; i < count; i++)
2723
0
    {
2724
0
      float factor = arrayZ[i].evaluate (coords, coord_len);
2725
0
      if (factor == 0.f)
2726
0
  return 0.;
2727
0
      v *= factor;
2728
0
    }
2729
0
    return v;
2730
0
  }
2731
};
2732
2733
struct SparseVarRegionList
2734
{
2735
  using cache_t = hb_atomic_t<int>;
2736
2737
  float evaluate (unsigned int region_index,
2738
      const int *coords, unsigned int coord_len,
2739
      cache_t *cache = nullptr) const
2740
0
  {
2741
0
    if (unlikely (region_index >= regions.len))
2742
0
      return 0.;
2743
0
2744
0
    cache_t *cached_value = nullptr;
2745
0
    if (cache)
2746
0
    {
2747
0
      cached_value = &(cache[region_index]);
2748
0
      if (*cached_value != REGION_CACHE_ITEM_CACHE_INVALID)
2749
0
  return *cached_value * REGION_CACHE_ITEM_DIVISOR;
2750
0
    }
2751
0
2752
0
    const SparseVariationRegion &region = this+regions[region_index];
2753
0
2754
0
    float v = region.evaluate (coords, coord_len);
2755
0
2756
0
    if (cache)
2757
0
      *cached_value = v * REGION_CACHE_ITEM_MULTIPLIER;
2758
0
    return v;
2759
0
  }
2760
2761
  bool sanitize (hb_sanitize_context_t *c) const
2762
0
  {
2763
0
    TRACE_SANITIZE (this);
2764
0
    return_trace (regions.sanitize (c, this));
2765
0
  }
2766
2767
  public:
2768
  Array16Of<Offset32To<SparseVariationRegion>>
2769
    regions;
2770
  public:
2771
  DEFINE_SIZE_ARRAY (2, regions);
2772
};
2773
2774
2775
struct VarData
2776
{
2777
  unsigned int get_item_count () const
2778
0
  { return itemCount; }
2779
2780
  unsigned int get_region_index_count () const
2781
0
  { return regionIndices.len; }
2782
2783
  unsigned get_region_index (unsigned i) const
2784
0
  { return i >= regionIndices.len ? -1 : regionIndices[i]; }
2785
2786
  unsigned int get_row_size () const
2787
0
  { return (wordCount () + regionIndices.len) * (longWords () ? 2 : 1); }
2788
2789
  unsigned int get_size () const
2790
0
  { return min_size
2791
0
   - regionIndices.min_size + regionIndices.get_size ()
2792
0
   + itemCount * get_row_size ();
2793
0
  }
2794
2795
  float get_delta (unsigned int inner,
2796
       const int *coords, unsigned int coord_count,
2797
       const VarRegionList &regions,
2798
       VarRegionList::cache_t *cache = nullptr) const
2799
0
  {
2800
0
    if (unlikely (inner >= itemCount))
2801
0
      return 0.;
2802
2803
0
   unsigned int count = regionIndices.len;
2804
0
   bool is_long = longWords ();
2805
0
   unsigned word_count = wordCount ();
2806
0
   unsigned int scount = is_long ? count : word_count;
2807
0
   unsigned int lcount = is_long ? word_count : 0;
2808
2809
0
   const HBUINT8 *bytes = get_delta_bytes ();
2810
0
   const HBUINT8 *row = bytes + inner * get_row_size ();
2811
2812
0
   float delta = 0.;
2813
0
   unsigned int i = 0;
2814
2815
0
   const HBINT32 *lcursor = reinterpret_cast<const HBINT32 *> (row);
2816
0
   for (; i < lcount; i++)
2817
0
   {
2818
0
     float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache);
2819
0
     delta += scalar * *lcursor++;
2820
0
   }
2821
0
   const HBINT16 *scursor = reinterpret_cast<const HBINT16 *> (lcursor);
2822
0
   for (; i < scount; i++)
2823
0
   {
2824
0
     float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache);
2825
0
     delta += scalar * *scursor++;
2826
0
   }
2827
0
   const HBINT8 *bcursor = reinterpret_cast<const HBINT8 *> (scursor);
2828
0
   for (; i < count; i++)
2829
0
   {
2830
0
     float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache);
2831
0
     delta += scalar * *bcursor++;
2832
0
   }
2833
2834
0
   return delta;
2835
0
  }
2836
2837
  void get_region_scalars (const int *coords, unsigned int coord_count,
2838
         const VarRegionList &regions,
2839
         float *scalars /*OUT */,
2840
         unsigned int num_scalars) const
2841
0
  {
2842
0
    unsigned count = hb_min (num_scalars, regionIndices.len);
2843
0
    for (unsigned int i = 0; i < count; i++)
2844
0
      scalars[i] = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count);
2845
0
    for (unsigned int i = count; i < num_scalars; i++)
2846
0
      scalars[i] = 0.f;
2847
0
  }
2848
2849
  bool sanitize (hb_sanitize_context_t *c) const
2850
0
  {
2851
0
    TRACE_SANITIZE (this);
2852
0
    return_trace (c->check_struct (this) &&
2853
0
      regionIndices.sanitize (c) &&
2854
0
      hb_barrier () &&
2855
0
      wordCount () <= regionIndices.len &&
2856
0
      c->check_range (get_delta_bytes (),
2857
0
          itemCount,
2858
0
          get_row_size ()));
2859
0
  }
2860
2861
  bool serialize (hb_serialize_context_t *c,
2862
                  bool has_long,
2863
                  const hb_vector_t<const hb_vector_t<int>*>& rows)
2864
0
  {
2865
0
    TRACE_SERIALIZE (this);
2866
0
    unsigned row_count = rows.length;
2867
0
    if (!row_count) {
2868
      // Nothing to serialize, will be empty.
2869
0
      return false;
2870
0
    }
2871
2872
0
    if (unlikely (!c->extend_min (this))) return_trace (false);    
2873
0
    itemCount = row_count;
2874
2875
0
    int min_threshold = has_long ? -65536 : -128;
2876
0
    int max_threshold = has_long ? +65535 : +127;
2877
0
    enum delta_size_t { kZero=0, kNonWord, kWord };
2878
0
    hb_vector_t<delta_size_t> delta_sz;
2879
0
    unsigned num_regions = rows[0]->length;
2880
0
    if (!delta_sz.resize (num_regions))
2881
0
      return_trace (false);
2882
2883
0
    unsigned word_count = 0;
2884
0
    for (unsigned r = 0; r < num_regions; r++)
2885
0
    {
2886
0
      for (unsigned i = 0; i < row_count; i++)
2887
0
      {
2888
0
        int delta = rows[i]->arrayZ[r];
2889
0
        if (delta < min_threshold || delta > max_threshold)
2890
0
        {
2891
0
          delta_sz[r] = kWord;
2892
0
          word_count++;
2893
0
          break;
2894
0
        }
2895
0
        else if (delta != 0)
2896
0
        {
2897
0
          delta_sz[r] = kNonWord;
2898
0
        }
2899
0
      }
2900
0
    }
2901
2902
    /* reorder regions: words and then non-words*/
2903
0
    unsigned word_index = 0;
2904
0
    unsigned non_word_index = word_count;
2905
0
    hb_map_t ri_map;
2906
0
    for (unsigned r = 0; r < num_regions; r++)
2907
0
    {
2908
0
      if (!delta_sz[r]) continue;
2909
0
      unsigned new_r = (delta_sz[r] == kWord)? word_index++ : non_word_index++;
2910
0
      if (!ri_map.set (new_r, r))
2911
0
        return_trace (false);
2912
0
    }
2913
2914
0
    wordSizeCount = word_count | (has_long ? 0x8000u /* LONG_WORDS */ : 0);
2915
2916
0
    unsigned ri_count = ri_map.get_population ();
2917
0
    regionIndices.len = ri_count;
2918
0
    if (unlikely (!c->extend (this))) return_trace (false);
2919
2920
0
    for (unsigned r = 0; r < ri_count; r++)
2921
0
    {
2922
0
      hb_codepoint_t *idx;
2923
0
      if (!ri_map.has (r, &idx))
2924
0
        return_trace (false);
2925
0
      regionIndices[r] = *idx;
2926
0
    }
2927
2928
0
    HBUINT8 *delta_bytes = get_delta_bytes ();
2929
0
    unsigned row_size = get_row_size ();
2930
0
    for (unsigned int i = 0; i < row_count; i++)
2931
0
    {
2932
0
      for (unsigned int r = 0; r < ri_count; r++)
2933
0
      {
2934
0
        int delta = rows[i]->arrayZ[ri_map[r]];
2935
0
        set_item_delta_fast (i, r, delta, delta_bytes, row_size);
2936
0
      }
2937
0
    }
2938
0
    return_trace (true);
2939
0
  }
Unexecuted instantiation: OT::VarData::serialize(hb_serialize_context_t*, bool, hb_vector_t<hb_vector_t<int, false> const*, false> const&)
Unexecuted instantiation: OT::VarData::serialize(hb_serialize_context_t*, bool, hb_vector_t<hb_vector_t<int, false> const*, false> const&)
2940
2941
  bool serialize (hb_serialize_context_t *c,
2942
      const VarData *src,
2943
      const hb_inc_bimap_t &inner_map,
2944
      const hb_inc_bimap_t &region_map)
2945
0
  {
2946
0
    TRACE_SERIALIZE (this);
2947
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
2948
0
    itemCount = inner_map.get_next_value ();
2949
2950
    /* Optimize word count */
2951
0
    unsigned ri_count = src->regionIndices.len;
2952
0
    enum delta_size_t { kZero=0, kNonWord, kWord };
2953
0
    hb_vector_t<delta_size_t> delta_sz;
2954
0
    hb_vector_t<unsigned int> ri_map; /* maps new index to old index */
2955
0
    delta_sz.resize (ri_count);
2956
0
    ri_map.resize (ri_count);
2957
0
    unsigned int new_word_count = 0;
2958
0
    unsigned int r;
2959
2960
0
    const HBUINT8 *src_delta_bytes = src->get_delta_bytes ();
2961
0
    unsigned src_row_size = src->get_row_size ();
2962
0
    unsigned src_word_count = src->wordCount ();
2963
0
    bool     src_long_words = src->longWords ();
2964
2965
0
    bool has_long = false;
2966
0
    if (src_long_words)
2967
0
    {
2968
0
      for (r = 0; r < src_word_count; r++)
2969
0
      {
2970
0
        for (unsigned old_gid : inner_map.keys())
2971
0
  {
2972
0
    int32_t delta = src->get_item_delta_fast (old_gid, r, src_delta_bytes, src_row_size);
2973
0
    if (delta < -65536 || 65535 < delta)
2974
0
    {
2975
0
      has_long = true;
2976
0
      break;
2977
0
    }
2978
0
        }
2979
0
      }
2980
0
    }
2981
2982
0
    signed min_threshold = has_long ? -65536 : -128;
2983
0
    signed max_threshold = has_long ? +65535 : +127;
2984
0
    for (r = 0; r < ri_count; r++)
2985
0
    {
2986
0
      bool short_circuit = src_long_words == has_long && src_word_count <= r;
2987
2988
0
      delta_sz[r] = kZero;
2989
0
      for (unsigned old_gid : inner_map.keys())
2990
0
      {
2991
0
  int32_t delta = src->get_item_delta_fast (old_gid, r, src_delta_bytes, src_row_size);
2992
0
  if (delta < min_threshold || max_threshold < delta)
2993
0
  {
2994
0
    delta_sz[r] = kWord;
2995
0
    new_word_count++;
2996
0
    break;
2997
0
  }
2998
0
  else if (delta != 0)
2999
0
  {
3000
0
    delta_sz[r] = kNonWord;
3001
0
    if (short_circuit)
3002
0
      break;
3003
0
  }
3004
0
      }
3005
0
    }
3006
3007
0
    unsigned int word_index = 0;
3008
0
    unsigned int non_word_index = new_word_count;
3009
0
    unsigned int new_ri_count = 0;
3010
0
    for (r = 0; r < ri_count; r++)
3011
0
      if (delta_sz[r])
3012
0
      {
3013
0
  unsigned new_r = (delta_sz[r] == kWord)? word_index++ : non_word_index++;
3014
0
  ri_map[new_r] = r;
3015
0
  new_ri_count++;
3016
0
      }
3017
3018
0
    wordSizeCount = new_word_count | (has_long ? 0x8000u /* LONG_WORDS */ : 0);
3019
3020
0
    regionIndices.len = new_ri_count;
3021
3022
0
    if (unlikely (!c->extend (this))) return_trace (false);
3023
3024
0
    for (r = 0; r < new_ri_count; r++)
3025
0
      regionIndices[r] = region_map[src->regionIndices[ri_map[r]]];
3026
3027
0
    HBUINT8 *delta_bytes = get_delta_bytes ();
3028
0
    unsigned row_size = get_row_size ();
3029
0
    unsigned count = itemCount;
3030
0
    for (unsigned int i = 0; i < count; i++)
3031
0
    {
3032
0
      unsigned int old = inner_map.backward (i);
3033
0
      for (unsigned int r = 0; r < new_ri_count; r++)
3034
0
  set_item_delta_fast (i, r,
3035
0
           src->get_item_delta_fast (old, ri_map[r],
3036
0
                   src_delta_bytes, src_row_size),
3037
0
           delta_bytes, row_size);
3038
0
    }
3039
3040
0
    return_trace (true);
3041
0
  }
Unexecuted instantiation: OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_inc_bimap_t const&)
Unexecuted instantiation: OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_inc_bimap_t const&)
3042
3043
  void collect_region_refs (hb_set_t &region_indices, const hb_inc_bimap_t &inner_map) const
3044
0
  {
3045
0
    const HBUINT8 *delta_bytes = get_delta_bytes ();
3046
0
    unsigned row_size = get_row_size ();
3047
3048
0
    for (unsigned int r = 0; r < regionIndices.len; r++)
3049
0
    {
3050
0
      unsigned int region = regionIndices.arrayZ[r];
3051
0
      if (region_indices.has (region)) continue;
3052
0
      for (hb_codepoint_t old_gid : inner_map.keys())
3053
0
  if (get_item_delta_fast (old_gid, r, delta_bytes, row_size) != 0)
3054
0
  {
3055
0
    region_indices.add (region);
3056
0
    break;
3057
0
  }
3058
0
    }
3059
0
  }
3060
3061
  public:
3062
  const HBUINT8 *get_delta_bytes () const
3063
0
  { return &StructAfter<HBUINT8> (regionIndices); }
3064
3065
  protected:
3066
  HBUINT8 *get_delta_bytes ()
3067
0
  { return &StructAfter<HBUINT8> (regionIndices); }
3068
3069
  public:
3070
  int32_t get_item_delta_fast (unsigned int item, unsigned int region,
3071
             const HBUINT8 *delta_bytes, unsigned row_size) const
3072
0
  {
3073
0
    if (unlikely (item >= itemCount || region >= regionIndices.len)) return 0;
3074
3075
0
    const HBINT8 *p = (const HBINT8 *) delta_bytes + item * row_size;
3076
0
    unsigned word_count = wordCount ();
3077
0
    bool is_long = longWords ();
3078
0
    if (is_long)
3079
0
    {
3080
0
      if (region < word_count)
3081
0
  return ((const HBINT32 *) p)[region];
3082
0
      else
3083
0
  return ((const HBINT16 *)(p + HBINT32::static_size * word_count))[region - word_count];
3084
0
    }
3085
0
    else
3086
0
    {
3087
0
      if (region < word_count)
3088
0
  return ((const HBINT16 *) p)[region];
3089
0
      else
3090
0
  return (p + HBINT16::static_size * word_count)[region - word_count];
3091
0
    }
3092
0
  }
Unexecuted instantiation: OT::VarData::get_item_delta_fast(unsigned int, unsigned int, OT::IntType<unsigned char, 1u> const*, unsigned int) const
Unexecuted instantiation: OT::VarData::get_item_delta_fast(unsigned int, unsigned int, OT::IntType<unsigned char, 1u> const*, unsigned int) const
3093
  int32_t get_item_delta (unsigned int item, unsigned int region) const
3094
0
  {
3095
0
     return get_item_delta_fast (item, region,
3096
0
         get_delta_bytes (),
3097
0
         get_row_size ());
3098
0
  }
3099
3100
  protected:
3101
  void set_item_delta_fast (unsigned int item, unsigned int region, int32_t delta,
3102
          HBUINT8 *delta_bytes, unsigned row_size)
3103
0
  {
3104
0
    HBINT8 *p = (HBINT8 *) delta_bytes + item * row_size;
3105
0
    unsigned word_count = wordCount ();
3106
0
    bool is_long = longWords ();
3107
0
    if (is_long)
3108
0
    {
3109
0
      if (region < word_count)
3110
0
  ((HBINT32 *) p)[region] = delta;
3111
0
      else
3112
0
  ((HBINT16 *)(p + HBINT32::static_size * word_count))[region - word_count] = delta;
3113
0
    }
3114
0
    else
3115
0
    {
3116
0
      if (region < word_count)
3117
0
  ((HBINT16 *) p)[region] = delta;
3118
0
      else
3119
0
  (p + HBINT16::static_size * word_count)[region - word_count] = delta;
3120
0
    }
3121
0
  }
3122
  void set_item_delta (unsigned int item, unsigned int region, int32_t delta)
3123
0
  {
3124
0
    set_item_delta_fast (item, region, delta,
3125
0
       get_delta_bytes (),
3126
0
       get_row_size ());
3127
0
  }
3128
3129
0
  bool longWords () const { return wordSizeCount & 0x8000u /* LONG_WORDS */; }
3130
0
  unsigned wordCount () const { return wordSizeCount & 0x7FFFu /* WORD_DELTA_COUNT_MASK */; }
3131
3132
  protected:
3133
  HBUINT16    itemCount;
3134
  HBUINT16    wordSizeCount;
3135
  Array16Of<HBUINT16> regionIndices;
3136
/*UnsizedArrayOf<HBUINT8>bytesX;*/
3137
  public:
3138
  DEFINE_SIZE_ARRAY (6, regionIndices);
3139
};
3140
3141
struct MultiVarData
3142
{
3143
  unsigned int get_size () const
3144
0
  { return min_size
3145
0
   - regionIndices.min_size + regionIndices.get_size ()
3146
0
   + StructAfter<CFF2Index> (regionIndices).get_size ();
3147
0
  }
3148
3149
  void get_delta (unsigned int inner,
3150
      const int *coords, unsigned int coord_count,
3151
      const SparseVarRegionList &regions,
3152
      hb_array_t<float> out,
3153
      SparseVarRegionList::cache_t *cache = nullptr) const
3154
0
  {
3155
0
    auto &deltaSets = StructAfter<decltype (deltaSetsX)> (regionIndices);
3156
0
3157
0
    auto values_iter = deltaSets.fetcher (inner);
3158
0
    unsigned regionCount = regionIndices.len;
3159
0
    for (unsigned regionIndex = 0; regionIndex < regionCount; regionIndex++)
3160
0
    {
3161
0
      float scalar = regions.evaluate (regionIndices.arrayZ[regionIndex],
3162
0
               coords, coord_count,
3163
0
               cache);
3164
0
      values_iter.add_to (out, scalar);
3165
0
    }
3166
0
  }
3167
3168
  bool sanitize (hb_sanitize_context_t *c) const
3169
0
  {
3170
0
    TRACE_SANITIZE (this);
3171
0
    return_trace (format.sanitize (c) &&
3172
0
      hb_barrier () &&
3173
0
      format == 1 &&
3174
0
      regionIndices.sanitize (c) &&
3175
0
      hb_barrier () &&
3176
0
      StructAfter<decltype (deltaSetsX)> (regionIndices).sanitize (c));
3177
0
  }
3178
3179
  protected:
3180
  HBUINT8       format; // 1
3181
  Array16Of<HBUINT16> regionIndices;
3182
  TupleList       deltaSetsX;
3183
  public:
3184
  DEFINE_SIZE_MIN (8);
3185
};
3186
3187
struct ItemVariationStore
3188
{
3189
  friend struct item_variations_t;
3190
  using cache_t = VarRegionList::cache_t;
3191
3192
  cache_t *create_cache () const
3193
0
  {
3194
#ifdef HB_NO_VAR
3195
    return nullptr;
3196
#endif
3197
0
    unsigned count = (this+regions).regionCount;
3198
0
    if (!count) return nullptr;
3199
3200
0
    cache_t *cache = (cache_t *) hb_malloc (sizeof (float) * count);
3201
0
    if (unlikely (!cache)) return nullptr;
3202
3203
0
    for (unsigned i = 0; i < count; i++)
3204
0
      cache[i] = REGION_CACHE_ITEM_CACHE_INVALID;
3205
3206
0
    return cache;
3207
0
  }
3208
3209
0
  static void destroy_cache (cache_t *cache) { hb_free (cache); }
3210
3211
  private:
3212
  float get_delta (unsigned int outer, unsigned int inner,
3213
       const int *coords, unsigned int coord_count,
3214
       VarRegionList::cache_t *cache = nullptr) const
3215
0
  {
3216
#ifdef HB_NO_VAR
3217
    return 0.f;
3218
#endif
3219
3220
0
    if (unlikely (outer >= dataSets.len))
3221
0
      return 0.f;
3222
3223
0
    return (this+dataSets[outer]).get_delta (inner,
3224
0
               coords, coord_count,
3225
0
               this+regions,
3226
0
               cache);
3227
0
  }
3228
3229
  public:
3230
  float get_delta (unsigned int index,
3231
       const int *coords, unsigned int coord_count,
3232
       VarRegionList::cache_t *cache = nullptr) const
3233
0
  {
3234
0
    unsigned int outer = index >> 16;
3235
0
    unsigned int inner = index & 0xFFFF;
3236
0
    return get_delta (outer, inner, coords, coord_count, cache);
3237
0
  }
3238
  float get_delta (unsigned int index,
3239
       hb_array_t<const int> coords,
3240
       VarRegionList::cache_t *cache = nullptr) const
3241
0
  {
3242
0
    return get_delta (index,
3243
0
          coords.arrayZ, coords.length,
3244
0
          cache);
3245
0
  }
3246
3247
  bool sanitize (hb_sanitize_context_t *c) const
3248
0
  {
3249
#ifdef HB_NO_VAR
3250
    return true;
3251
#endif
3252
3253
0
    TRACE_SANITIZE (this);
3254
0
    return_trace (c->check_struct (this) &&
3255
0
      hb_barrier () &&
3256
0
      format == 1 &&
3257
0
      regions.sanitize (c, this) &&
3258
0
      dataSets.sanitize (c, this));
3259
0
  }
3260
3261
  bool serialize (hb_serialize_context_t *c,
3262
                  bool has_long,
3263
                  const hb_vector_t<hb_tag_t>& axis_tags,
3264
                  const hb_vector_t<const hb_hashmap_t<hb_tag_t, Triple>*>& region_list,
3265
                  const hb_vector_t<delta_row_encoding_t>& vardata_encodings)
3266
0
  {
3267
0
    TRACE_SERIALIZE (this);
3268
#ifdef HB_NO_VAR
3269
    return_trace (false);
3270
#endif
3271
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
3272
3273
0
    format = 1;
3274
0
    if (!regions.serialize_serialize (c, axis_tags, region_list))
3275
0
      return_trace (false);
3276
3277
0
    unsigned num_var_data = vardata_encodings.length;
3278
0
    if (!num_var_data) return_trace (false);
3279
0
    if (unlikely (!c->check_assign (dataSets.len, num_var_data,
3280
0
                                    HB_SERIALIZE_ERROR_INT_OVERFLOW)))
3281
0
      return_trace (false);
3282
3283
0
    if (unlikely (!c->extend (dataSets))) return_trace (false);
3284
0
    for (unsigned i = 0; i < num_var_data; i++)
3285
0
      if (!dataSets[i].serialize_serialize (c, has_long, vardata_encodings[i].items))
3286
0
        return_trace (false);
3287
3288
0
    return_trace (true);
3289
0
  }
Unexecuted instantiation: OT::ItemVariationStore::serialize(hb_serialize_context_t*, bool, hb_vector_t<unsigned int, false> const&, hb_vector_t<hb_hashmap_t<unsigned int, Triple, false> const*, false> const&, hb_vector_t<OT::delta_row_encoding_t, false> const&)
Unexecuted instantiation: OT::ItemVariationStore::serialize(hb_serialize_context_t*, bool, hb_vector_t<unsigned int, false> const&, hb_vector_t<hb_hashmap_t<unsigned int, Triple, false> const*, false> const&, hb_vector_t<OT::delta_row_encoding_t, false> const&)
3290
3291
  bool serialize (hb_serialize_context_t *c,
3292
      const ItemVariationStore *src,
3293
      const hb_array_t <const hb_inc_bimap_t> &inner_maps)
3294
0
  {
3295
0
    TRACE_SERIALIZE (this);
3296
#ifdef HB_NO_VAR
3297
    return_trace (false);
3298
#endif
3299
3300
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
3301
3302
0
    unsigned int set_count = 0;
3303
0
    for (unsigned int i = 0; i < inner_maps.length; i++)
3304
0
      if (inner_maps[i].get_population ())
3305
0
  set_count++;
3306
3307
0
    format = 1;
3308
3309
0
    const auto &src_regions = src+src->regions;
3310
3311
0
    hb_set_t region_indices;
3312
0
    for (unsigned int i = 0; i < inner_maps.length; i++)
3313
0
      (src+src->dataSets[i]).collect_region_refs (region_indices, inner_maps[i]);
3314
3315
0
    if (region_indices.in_error ())
3316
0
      return_trace (false);
3317
3318
0
    region_indices.del_range ((src_regions).regionCount, hb_set_t::INVALID);
3319
3320
    /* TODO use constructor when our data-structures support that. */
3321
0
    hb_inc_bimap_t region_map;
3322
0
    + hb_iter (region_indices)
3323
0
    | hb_apply ([&region_map] (unsigned _) { region_map.add(_); })
3324
0
    ;
3325
0
    if (region_map.in_error())
3326
0
      return_trace (false);
3327
3328
0
    if (unlikely (!regions.serialize_serialize (c, &src_regions, region_map)))
3329
0
      return_trace (false);
3330
3331
0
    dataSets.len = set_count;
3332
0
    if (unlikely (!c->extend (dataSets))) return_trace (false);
3333
3334
    /* TODO: The following code could be simplified when
3335
     * List16OfOffset16To::subset () can take a custom param to be passed to VarData::serialize () */
3336
0
    unsigned int set_index = 0;
3337
0
    for (unsigned int i = 0; i < inner_maps.length; i++)
3338
0
    {
3339
0
      if (!inner_maps[i].get_population ()) continue;
3340
0
      if (unlikely (!dataSets[set_index++]
3341
0
         .serialize_serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map)))
3342
0
  return_trace (false);
3343
0
    }
3344
3345
0
    return_trace (true);
3346
0
  }
Unexecuted instantiation: OT::ItemVariationStore::serialize(hb_serialize_context_t*, OT::ItemVariationStore const*, hb_array_t<hb_inc_bimap_t const> const&)
Unexecuted instantiation: OT::ItemVariationStore::serialize(hb_serialize_context_t*, OT::ItemVariationStore const*, hb_array_t<hb_inc_bimap_t const> const&)
3347
3348
  ItemVariationStore *copy (hb_serialize_context_t *c) const
3349
0
  {
3350
0
    TRACE_SERIALIZE (this);
3351
0
    auto *out = c->start_embed (this);
3352
0
    if (unlikely (!out)) return_trace (nullptr);
3353
0
3354
0
    hb_vector_t <hb_inc_bimap_t> inner_maps;
3355
0
    unsigned count = dataSets.len;
3356
0
    for (unsigned i = 0; i < count; i++)
3357
0
    {
3358
0
      hb_inc_bimap_t *map = inner_maps.push ();
3359
0
      if (!c->propagate_error(inner_maps))
3360
0
        return_trace(nullptr);
3361
0
      auto &data = this+dataSets[i];
3362
0
3363
0
      unsigned itemCount = data.get_item_count ();
3364
0
      for (unsigned j = 0; j < itemCount; j++)
3365
0
  map->add (j);
3366
0
    }
3367
0
3368
0
    if (unlikely (!out->serialize (c, this, inner_maps))) return_trace (nullptr);
3369
0
3370
0
    return_trace (out);
3371
0
  }
3372
3373
  bool subset (hb_subset_context_t *c, const hb_array_t<const hb_inc_bimap_t> &inner_maps) const
3374
0
  {
3375
0
    TRACE_SUBSET (this);
3376
#ifdef HB_NO_VAR
3377
    return_trace (false);
3378
#endif
3379
3380
0
    ItemVariationStore *varstore_prime = c->serializer->start_embed<ItemVariationStore> ();
3381
0
    if (unlikely (!varstore_prime)) return_trace (false);
3382
3383
0
    varstore_prime->serialize (c->serializer, this, inner_maps);
3384
3385
0
    return_trace (
3386
0
        !c->serializer->in_error()
3387
0
        && varstore_prime->dataSets);
3388
0
  }
Unexecuted instantiation: OT::ItemVariationStore::subset(hb_subset_context_t*, hb_array_t<hb_inc_bimap_t const> const&) const
Unexecuted instantiation: OT::ItemVariationStore::subset(hb_subset_context_t*, hb_array_t<hb_inc_bimap_t const> const&) const
3389
3390
  unsigned int get_region_index_count (unsigned int major) const
3391
0
  {
3392
#ifdef HB_NO_VAR
3393
    return 0;
3394
#endif
3395
0
    return (this+dataSets[major]).get_region_index_count ();
3396
0
  }
3397
3398
  void get_region_scalars (unsigned int major,
3399
         const int *coords, unsigned int coord_count,
3400
         float *scalars /*OUT*/,
3401
         unsigned int num_scalars) const
3402
0
  {
3403
#ifdef HB_NO_VAR
3404
    for (unsigned i = 0; i < num_scalars; i++)
3405
      scalars[i] = 0.f;
3406
    return;
3407
#endif
3408
3409
0
    (this+dataSets[major]).get_region_scalars (coords, coord_count,
3410
0
                 this+regions,
3411
0
                 &scalars[0], num_scalars);
3412
0
  }
3413
3414
  unsigned int get_sub_table_count () const
3415
0
   {
3416
#ifdef HB_NO_VAR
3417
     return 0;
3418
#endif
3419
0
     return dataSets.len;
3420
0
   }
3421
3422
  const VarData& get_sub_table (unsigned i) const
3423
0
  {
3424
#ifdef HB_NO_VAR
3425
     return Null (VarData);
3426
#endif
3427
0
     return this+dataSets[i];
3428
0
  }
3429
3430
  const VarRegionList& get_region_list () const
3431
0
  {
3432
#ifdef HB_NO_VAR
3433
     return Null (VarRegionList);
3434
#endif
3435
0
     return this+regions;
3436
0
  }
3437
3438
  protected:
3439
  HBUINT16        format;
3440
  Offset32To<VarRegionList>   regions;
3441
  Array16OfOffset32To<VarData>    dataSets;
3442
  public:
3443
  DEFINE_SIZE_ARRAY_SIZED (8, dataSets);
3444
};
3445
3446
struct MultiItemVariationStore
3447
{
3448
  using cache_t = SparseVarRegionList::cache_t;
3449
3450
  cache_t *create_cache (hb_array_t<cache_t> static_cache = hb_array_t<cache_t> ()) const
3451
0
  {
3452
0
#ifdef HB_NO_VAR
3453
0
    return nullptr;
3454
0
#endif
3455
0
    auto &r = this+regions;
3456
0
    unsigned count = r.regions.len;
3457
0
3458
0
    cache_t *cache;
3459
0
    if (count <= static_cache.length)
3460
0
      cache = static_cache.arrayZ;
3461
0
    else
3462
0
    {
3463
0
      cache = (cache_t *) hb_malloc (sizeof (float) * count);
3464
0
      if (unlikely (!cache)) return nullptr;
3465
0
    }
3466
0
3467
0
    for (unsigned i = 0; i < count; i++)
3468
0
      cache[i] = REGION_CACHE_ITEM_CACHE_INVALID;
3469
0
3470
0
    return cache;
3471
0
  }
3472
3473
  static void destroy_cache (cache_t *cache,
3474
           hb_array_t<cache_t> static_cache = hb_array_t<cache_t> ())
3475
0
  {
3476
0
    if (cache != static_cache.arrayZ)
3477
0
      hb_free (cache);
3478
0
  }
3479
3480
  private:
3481
  void get_delta (unsigned int outer, unsigned int inner,
3482
      const int *coords, unsigned int coord_count,
3483
      hb_array_t<float> out,
3484
      VarRegionList::cache_t *cache = nullptr) const
3485
0
  {
3486
0
#ifdef HB_NO_VAR
3487
0
    return;
3488
0
#endif
3489
0
3490
0
    if (unlikely (outer >= dataSets.len))
3491
0
      return;
3492
0
3493
0
    return (this+dataSets[outer]).get_delta (inner,
3494
0
               coords, coord_count,
3495
0
               this+regions,
3496
0
               out,
3497
0
               cache);
3498
0
  }
3499
3500
  public:
3501
  void get_delta (unsigned int index,
3502
      const int *coords, unsigned int coord_count,
3503
      hb_array_t<float> out,
3504
      VarRegionList::cache_t *cache = nullptr) const
3505
0
  {
3506
0
    unsigned int outer = index >> 16;
3507
0
    unsigned int inner = index & 0xFFFF;
3508
0
    get_delta (outer, inner, coords, coord_count, out, cache);
3509
0
  }
3510
  void get_delta (unsigned int index,
3511
      hb_array_t<const int> coords,
3512
      hb_array_t<float> out,
3513
      VarRegionList::cache_t *cache = nullptr) const
3514
0
  {
3515
0
    return get_delta (index,
3516
0
          coords.arrayZ, coords.length,
3517
0
          out,
3518
0
          cache);
3519
0
  }
3520
3521
  bool sanitize (hb_sanitize_context_t *c) const
3522
0
  {
3523
0
#ifdef HB_NO_VAR
3524
0
    return true;
3525
0
#endif
3526
0
3527
0
    TRACE_SANITIZE (this);
3528
0
    return_trace (c->check_struct (this) &&
3529
0
      hb_barrier () &&
3530
0
      format == 1 &&
3531
0
      regions.sanitize (c, this) &&
3532
0
      dataSets.sanitize (c, this));
3533
0
  }
3534
3535
  protected:
3536
  HBUINT16        format; // 1
3537
  Offset32To<SparseVarRegionList> regions;
3538
  Array16OfOffset32To<MultiVarData> dataSets;
3539
  public:
3540
  DEFINE_SIZE_ARRAY_SIZED (8, dataSets);
3541
};
3542
3543
#undef REGION_CACHE_ITEM_CACHE_INVALID
3544
3545
template <typename MapCountT>
3546
struct DeltaSetIndexMapFormat01
3547
{
3548
  friend struct DeltaSetIndexMap;
3549
3550
  unsigned get_size () const
3551
0
  { return min_size + mapCount * get_width (); }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::get_size() const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::get_size() const
3552
3553
  private:
3554
  DeltaSetIndexMapFormat01* copy (hb_serialize_context_t *c) const
3555
0
  {
3556
0
    TRACE_SERIALIZE (this);
3557
0
    return_trace (c->embed (this));
3558
0
  }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::copy(hb_serialize_context_t*) const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::copy(hb_serialize_context_t*) const
3559
3560
  template <typename T>
3561
  bool serialize (hb_serialize_context_t *c, const T &plan)
3562
0
  {
3563
0
    unsigned int width = plan.get_width ();
3564
0
    unsigned int inner_bit_count = plan.get_inner_bit_count ();
3565
0
    const hb_array_t<const uint32_t> output_map = plan.get_output_map ();
3566
3567
0
    TRACE_SERIALIZE (this);
3568
0
    if (unlikely (output_map.length && ((((inner_bit_count-1)&~0xF)!=0) || (((width-1)&~0x3)!=0))))
3569
0
      return_trace (false);
3570
0
    if (unlikely (!c->extend_min (this))) return_trace (false);
3571
3572
0
    entryFormat = ((width-1)<<4)|(inner_bit_count-1);
3573
0
    mapCount = output_map.length;
3574
0
    HBUINT8 *p = c->allocate_size<HBUINT8> (width * output_map.length);
3575
0
    if (unlikely (!p)) return_trace (false);
3576
0
    for (unsigned int i = 0; i < output_map.length; i++)
3577
0
    {
3578
0
      unsigned int v = output_map.arrayZ[i];
3579
0
      if (v)
3580
0
      {
3581
0
  unsigned int outer = v >> 16;
3582
0
  unsigned int inner = v & 0xFFFF;
3583
0
  unsigned int u = (outer << inner_bit_count) | inner;
3584
0
  for (unsigned int w = width; w > 0;)
3585
0
  {
3586
0
    p[--w] = u;
3587
0
    u >>= 8;
3588
0
  }
3589
0
      }
3590
0
      p += width;
3591
0
    }
3592
0
    return_trace (true);
3593
0
  }
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
3594
3595
  uint32_t map (unsigned int v) const /* Returns 16.16 outer.inner. */
3596
0
  {
3597
    /* If count is zero, pass value unchanged.  This takes
3598
     * care of direct mapping for advance map. */
3599
0
    if (!mapCount)
3600
0
      return v;
3601
3602
0
    if (v >= mapCount)
3603
0
      v = mapCount - 1;
3604
3605
0
    unsigned int u = 0;
3606
0
    { /* Fetch it. */
3607
0
      unsigned int w = get_width ();
3608
0
      const HBUINT8 *p = mapDataZ.arrayZ + w * v;
3609
0
      for (; w; w--)
3610
0
        u = (u << 8) + *p++;
3611
0
    }
3612
3613
0
    { /* Repack it. */
3614
0
      unsigned int n = get_inner_bit_count ();
3615
0
      unsigned int outer = u >> n;
3616
0
      unsigned int inner = u & ((1 << n) - 1);
3617
0
      u = (outer<<16) | inner;
3618
0
    }
3619
3620
0
    return u;
3621
0
  }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::map(unsigned int) const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::map(unsigned int) const
3622
3623
0
  unsigned get_map_count () const       { return mapCount; }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::get_map_count() const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::get_map_count() const
3624
0
  unsigned get_width () const           { return ((entryFormat >> 4) & 3) + 1; }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::get_width() const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::get_width() const
3625
0
  unsigned get_inner_bit_count () const { return (entryFormat & 0xF) + 1; }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::get_inner_bit_count() const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::get_inner_bit_count() const
3626
3627
3628
  bool sanitize (hb_sanitize_context_t *c) const
3629
0
  {
3630
0
    TRACE_SANITIZE (this);
3631
0
    return_trace (c->check_struct (this) &&
3632
0
      hb_barrier () &&
3633
0
                  c->check_range (mapDataZ.arrayZ,
3634
0
                                  mapCount,
3635
0
                                  get_width ()));
3636
0
  }
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned short, 2u> >::sanitize(hb_sanitize_context_t*) const
Unexecuted instantiation: OT::DeltaSetIndexMapFormat01<OT::IntType<unsigned int, 4u> >::sanitize(hb_sanitize_context_t*) const
3637
3638
  protected:
3639
  HBUINT8       format;         /* Format identifier--format = 0 */
3640
  HBUINT8       entryFormat;    /* A packed field that describes the compressed
3641
                                 * representation of delta-set indices. */
3642
  MapCountT     mapCount;       /* The number of mapping entries. */
3643
  UnsizedArrayOf<HBUINT8>
3644
                mapDataZ;       /* The delta-set index mapping data. */
3645
3646
  public:
3647
  DEFINE_SIZE_ARRAY (2+MapCountT::static_size, mapDataZ);
3648
};
3649
3650
struct DeltaSetIndexMap
3651
{
3652
  template <typename T>
3653
  bool serialize (hb_serialize_context_t *c, const T &plan)
3654
0
  {
3655
0
    TRACE_SERIALIZE (this);
3656
0
    unsigned length = plan.get_output_map ().length;
3657
0
    u.format = length <= 0xFFFF ? 0 : 1;
3658
0
    switch (u.format) {
3659
0
    case 0: hb_barrier (); return_trace (u.format0.serialize (c, plan));
3660
0
    case 1: hb_barrier (); return_trace (u.format1.serialize (c, plan));
3661
0
    default:return_trace (false);
3662
0
    }
3663
0
  }
Unexecuted instantiation: bool OT::DeltaSetIndexMap::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMap::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMap::serialize<OT::index_map_subset_plan_t>(hb_serialize_context_t*, OT::index_map_subset_plan_t const&)
Unexecuted instantiation: bool OT::DeltaSetIndexMap::serialize<OT::delta_set_index_map_subset_plan_t>(hb_serialize_context_t*, OT::delta_set_index_map_subset_plan_t const&)
3664
3665
  uint32_t map (unsigned v) const
3666
0
  {
3667
0
    switch (u.format) {
3668
0
    case 0: hb_barrier (); return (u.format0.map (v));
3669
0
    case 1: hb_barrier (); return (u.format1.map (v));
3670
0
    default:return v;
3671
0
    }
3672
0
  }
3673
3674
  unsigned get_map_count () const
3675
0
  {
3676
0
    switch (u.format) {
3677
0
    case 0: hb_barrier (); return u.format0.get_map_count ();
3678
0
    case 1: hb_barrier (); return u.format1.get_map_count ();
3679
0
    default:return 0;
3680
0
    }
3681
0
  }
3682
3683
  unsigned get_width () const
3684
0
  {
3685
0
    switch (u.format) {
3686
0
    case 0: hb_barrier (); return u.format0.get_width ();
3687
0
    case 1: hb_barrier (); return u.format1.get_width ();
3688
0
    default:return 0;
3689
0
    }
3690
0
  }
3691
3692
  unsigned get_inner_bit_count () const
3693
0
  {
3694
0
    switch (u.format) {
3695
0
    case 0: hb_barrier (); return u.format0.get_inner_bit_count ();
3696
0
    case 1: hb_barrier (); return u.format1.get_inner_bit_count ();
3697
0
    default:return 0;
3698
0
    }
3699
0
  }
3700
3701
  bool sanitize (hb_sanitize_context_t *c) const
3702
0
  {
3703
0
    TRACE_SANITIZE (this);
3704
0
    if (!u.format.sanitize (c)) return_trace (false);
3705
0
    hb_barrier ();
3706
0
    switch (u.format) {
3707
0
    case 0: hb_barrier (); return_trace (u.format0.sanitize (c));
3708
0
    case 1: hb_barrier (); return_trace (u.format1.sanitize (c));
3709
0
    default:return_trace (true);
3710
0
    }
3711
0
  }
3712
3713
  DeltaSetIndexMap* copy (hb_serialize_context_t *c) const
3714
0
  {
3715
0
    TRACE_SERIALIZE (this);
3716
0
    switch (u.format) {
3717
0
    case 0: hb_barrier (); return_trace (reinterpret_cast<DeltaSetIndexMap *> (u.format0.copy (c)));
3718
0
    case 1: hb_barrier (); return_trace (reinterpret_cast<DeltaSetIndexMap *> (u.format1.copy (c)));
3719
0
    default:return_trace (nullptr);
3720
0
    }
3721
0
  }
3722
3723
  protected:
3724
  union {
3725
  HBUINT8                            format;         /* Format identifier */
3726
  DeltaSetIndexMapFormat01<HBUINT16> format0;
3727
  DeltaSetIndexMapFormat01<HBUINT32> format1;
3728
  } u;
3729
  public:
3730
  DEFINE_SIZE_UNION (1, format);
3731
};
3732
3733
3734
struct ItemVarStoreInstancer
3735
{
3736
  ItemVarStoreInstancer (const ItemVariationStore *varStore_,
3737
       const DeltaSetIndexMap *varIdxMap,
3738
       hb_array_t<const int> coords,
3739
       VarRegionList::cache_t *cache = nullptr) :
3740
0
    varStore (varStore_), varIdxMap (varIdxMap), coords (coords), cache (cache)
3741
0
  {
3742
0
    if (!varStore)
3743
0
      varStore = &Null(ItemVariationStore);
3744
0
  }
3745
3746
0
  operator bool () const { return varStore && bool (coords); }
3747
3748
  float operator[] (uint32_t varIdx) const
3749
0
  { return (*this) (varIdx); }
3750
3751
  float operator() (uint32_t varIdx, unsigned short offset = 0) const
3752
0
  {
3753
0
   if (!coords || varIdx == VarIdx::NO_VARIATION)
3754
0
     return 0.f;
3755
3756
0
    varIdx += offset;
3757
0
    if (varIdxMap)
3758
0
      varIdx = varIdxMap->map (varIdx);
3759
0
    return varStore->get_delta (varIdx, coords, cache);
3760
0
  }
3761
3762
  const ItemVariationStore *varStore;
3763
  const DeltaSetIndexMap *varIdxMap;
3764
  hb_array_t<const int> coords;
3765
  VarRegionList::cache_t *cache;
3766
};
3767
3768
struct MultiItemVarStoreInstancer
3769
{
3770
  MultiItemVarStoreInstancer (const MultiItemVariationStore *varStore,
3771
            const DeltaSetIndexMap *varIdxMap,
3772
            hb_array_t<const int> coords,
3773
            SparseVarRegionList::cache_t *cache = nullptr) :
3774
    varStore (varStore), varIdxMap (varIdxMap), coords (coords), cache (cache)
3775
0
  {
3776
0
    if (!varStore)
3777
0
      varStore = &Null(MultiItemVariationStore);
3778
0
  }
3779
3780
0
  operator bool () const { return varStore && bool (coords); }
3781
3782
  float operator[] (uint32_t varIdx) const
3783
0
  {
3784
0
    float v = 0;
3785
0
    (*this) (hb_array (&v, 1), varIdx);
3786
0
    return v;
3787
0
  }
3788
3789
  void operator() (hb_array_t<float> out, uint32_t varIdx, unsigned short offset = 0) const
3790
0
  {
3791
0
    if (coords && varIdx != VarIdx::NO_VARIATION)
3792
0
    {
3793
0
      varIdx += offset;
3794
0
      if (varIdxMap)
3795
0
  varIdx = varIdxMap->map (varIdx);
3796
0
      varStore->get_delta (varIdx, coords, out, cache);
3797
0
    }
3798
0
    else
3799
0
      for (unsigned i = 0; i < out.length; i++)
3800
0
        out.arrayZ[i] = 0.f;
3801
0
  }
3802
3803
  const MultiItemVariationStore *varStore;
3804
  const DeltaSetIndexMap *varIdxMap;
3805
  hb_array_t<const int> coords;
3806
  SparseVarRegionList::cache_t *cache;
3807
};
3808
3809
3810
/*
3811
 * Feature Variations
3812
 */
3813
enum Cond_with_Var_flag_t
3814
{
3815
  KEEP_COND_WITH_VAR = 0,
3816
  KEEP_RECORD_WITH_VAR = 1,
3817
  DROP_COND_WITH_VAR = 2,
3818
  DROP_RECORD_WITH_VAR = 3,
3819
};
3820
3821
struct Condition;
3822
3823
template <typename Instancer>
3824
static bool
3825
_hb_recurse_condition_evaluate (const struct Condition &condition,
3826
        const int *coords,
3827
        unsigned int coord_len,
3828
        Instancer *instancer);
3829
3830
struct ConditionAxisRange
3831
{
3832
  friend struct Condition;
3833
3834
  bool subset (hb_subset_context_t *c) const
3835
0
  {
3836
0
    TRACE_SUBSET (this);
3837
0
    auto *out = c->serializer->embed (this);
3838
0
    if (unlikely (!out)) return_trace (false);
3839
3840
0
    const hb_map_t *index_map = &c->plan->axes_index_map;
3841
0
    if (index_map->is_empty ()) return_trace (true);
3842
3843
0
    const hb_map_t& axes_old_index_tag_map = c->plan->axes_old_index_tag_map;
3844
0
    hb_codepoint_t *axis_tag;
3845
0
    if (!axes_old_index_tag_map.has (axisIndex, &axis_tag) ||
3846
0
        !index_map->has (axisIndex))
3847
0
      return_trace (false);
3848
3849
0
    const hb_hashmap_t<hb_tag_t, Triple>& normalized_axes_location = c->plan->axes_location;
3850
0
    Triple axis_limit{-1.0, 0.0, 1.0};
3851
0
    Triple *normalized_limit;
3852
0
    if (normalized_axes_location.has (*axis_tag, &normalized_limit))
3853
0
      axis_limit = *normalized_limit;
3854
3855
0
    const hb_hashmap_t<hb_tag_t, TripleDistances>& axes_triple_distances = c->plan->axes_triple_distances;
3856
0
    TripleDistances axis_triple_distances{1.0, 1.0};
3857
0
    TripleDistances *triple_dists;
3858
0
    if (axes_triple_distances.has (*axis_tag, &triple_dists))
3859
0
      axis_triple_distances = *triple_dists;
3860
3861
0
    float normalized_min = renormalizeValue ((double) filterRangeMinValue.to_float (), axis_limit, axis_triple_distances, false);
3862
0
    float normalized_max = renormalizeValue ((double) filterRangeMaxValue.to_float (), axis_limit, axis_triple_distances, false);
3863
0
    out->filterRangeMinValue.set_float (normalized_min);
3864
0
    out->filterRangeMaxValue.set_float (normalized_max);
3865
3866
0
    return_trace (c->serializer->check_assign (out->axisIndex, index_map->get (axisIndex),
3867
0
                                               HB_SERIALIZE_ERROR_INT_OVERFLOW));
3868
0
  }
Unexecuted instantiation: OT::ConditionAxisRange::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::ConditionAxisRange::subset(hb_subset_context_t*) const
3869
3870
  private:
3871
  Cond_with_Var_flag_t keep_with_variations (hb_collect_feature_substitutes_with_var_context_t *c,
3872
                                             hb_map_t *condition_map /* OUT */) const
3873
0
  {
3874
    //invalid axis index, drop the entire record
3875
0
    if (!c->axes_index_tag_map->has (axisIndex))
3876
0
      return DROP_RECORD_WITH_VAR;
3877
3878
0
    hb_tag_t axis_tag = c->axes_index_tag_map->get (axisIndex);
3879
3880
0
    Triple axis_range (-1.0, 0.0, 1.0);
3881
0
    Triple *axis_limit;
3882
0
    bool axis_set_by_user = false;
3883
0
    if (c->axes_location->has (axis_tag, &axis_limit))
3884
0
    {
3885
0
      axis_range = *axis_limit;
3886
0
      axis_set_by_user = true;
3887
0
    }
3888
3889
0
    float axis_min_val = axis_range.minimum;
3890
0
    float axis_default_val = axis_range.middle;
3891
0
    float axis_max_val = axis_range.maximum;
3892
3893
0
    float filter_min_val = filterRangeMinValue.to_float ();
3894
0
    float filter_max_val = filterRangeMaxValue.to_float ();
3895
3896
0
    if (axis_default_val < filter_min_val ||
3897
0
        axis_default_val > filter_max_val)
3898
0
      c->apply = false;
3899
3900
    //condition not met, drop the entire record
3901
0
    if (axis_min_val > filter_max_val || axis_max_val < filter_min_val ||
3902
0
        filter_min_val > filter_max_val)
3903
0
      return DROP_RECORD_WITH_VAR;
3904
3905
    //condition met and axis pinned, drop the condition
3906
0
    if (axis_set_by_user && axis_range.is_point ())
3907
0
      return DROP_COND_WITH_VAR;
3908
3909
0
    if (filter_max_val != axis_max_val || filter_min_val != axis_min_val)
3910
0
    {
3911
      // add axisIndex->value into the hashmap so we can check if the record is
3912
      // unique with variations
3913
0
      uint16_t int_filter_max_val = (uint16_t) filterRangeMaxValue.to_int ();
3914
0
      uint16_t int_filter_min_val = (uint16_t) filterRangeMinValue.to_int ();
3915
0
      hb_codepoint_t val = (int_filter_max_val << 16) + int_filter_min_val;
3916
3917
0
      condition_map->set (axisIndex, val);
3918
0
      return KEEP_COND_WITH_VAR;
3919
0
    }
3920
0
    return KEEP_RECORD_WITH_VAR;
3921
0
  }
3922
3923
  template <typename Instancer>
3924
  bool evaluate (const int *coords, unsigned int coord_len,
3925
     Instancer *instancer HB_UNUSED) const
3926
0
  {
3927
0
    int coord = axisIndex < coord_len ? coords[axisIndex] : 0;
3928
0
    return filterRangeMinValue.to_int () <= coord && coord <= filterRangeMaxValue.to_int ();
3929
0
  }
3930
3931
  bool sanitize (hb_sanitize_context_t *c) const
3932
0
  {
3933
0
    TRACE_SANITIZE (this);
3934
0
    return_trace (c->check_struct (this));
3935
0
  }
3936
3937
  protected:
3938
  HBUINT16  format;   /* Format identifier--format = 1 */
3939
  HBUINT16  axisIndex;
3940
  F2DOT14 filterRangeMinValue;
3941
  F2DOT14 filterRangeMaxValue;
3942
  public:
3943
  DEFINE_SIZE_STATIC (8);
3944
};
3945
3946
struct ConditionValue
3947
{
3948
  friend struct Condition;
3949
3950
  bool subset (hb_subset_context_t *c) const
3951
0
  {
3952
0
    TRACE_SUBSET (this);
3953
    // TODO(subset)
3954
0
    return_trace (false);
3955
0
  }
Unexecuted instantiation: OT::ConditionValue::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::ConditionValue::subset(hb_subset_context_t*) const
3956
3957
  private:
3958
  template <typename Instancer>
3959
  bool evaluate (const int *coords, unsigned int coord_len,
3960
     Instancer *instancer) const
3961
0
  {
3962
0
    signed value = defaultValue;
3963
0
    value += (*instancer)[varIdx];
3964
0
    return value > 0;
3965
0
  }
3966
3967
  bool subset (hb_subset_context_t *c,
3968
               hb_subset_layout_context_t *l,
3969
               bool insert_catch_all) const
3970
0
  {
3971
0
    TRACE_SUBSET (this);
3972
0
    // TODO(subset)
3973
0
    return_trace (false);
3974
0
  }
3975
3976
  bool sanitize (hb_sanitize_context_t *c) const
3977
0
  {
3978
0
    TRACE_SANITIZE (this);
3979
0
    return_trace (c->check_struct (this));
3980
0
  }
3981
3982
  protected:
3983
  HBUINT16  format;   /* Format identifier--format = 2 */
3984
  HBINT16 defaultValue;   /* Value at default instance. */
3985
  VarIdx  varIdx;   /* Variation index */
3986
  public:
3987
  DEFINE_SIZE_STATIC (8);
3988
};
3989
3990
struct ConditionAnd
3991
{
3992
  friend struct Condition;
3993
3994
  bool subset (hb_subset_context_t *c) const
3995
0
  {
3996
0
    TRACE_SUBSET (this);
3997
    // TODO(subset)
3998
0
    return_trace (false);
3999
0
  }
Unexecuted instantiation: OT::ConditionAnd::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::ConditionAnd::subset(hb_subset_context_t*) const
4000
4001
  private:
4002
  template <typename Instancer>
4003
  bool evaluate (const int *coords, unsigned int coord_len,
4004
     Instancer *instancer) const
4005
0
  {
4006
0
    unsigned int count = conditions.len;
4007
0
    for (unsigned int i = 0; i < count; i++)
4008
0
      if (!_hb_recurse_condition_evaluate (this+conditions.arrayZ[i],
4009
0
             coords, coord_len,
4010
0
             instancer))
4011
0
  return false;
4012
0
    return true;
4013
0
  }
4014
4015
  bool subset (hb_subset_context_t *c,
4016
               hb_subset_layout_context_t *l,
4017
               bool insert_catch_all) const
4018
0
  {
4019
0
    TRACE_SUBSET (this);
4020
0
    // TODO(subset)
4021
0
    return_trace (false);
4022
0
  }
4023
4024
  bool sanitize (hb_sanitize_context_t *c) const
4025
0
  {
4026
0
    TRACE_SANITIZE (this);
4027
0
    return_trace (conditions.sanitize (c, this));
4028
0
  }
4029
4030
  protected:
4031
  HBUINT16  format;   /* Format identifier--format = 3 */
4032
  Array8OfOffset24To<struct Condition>  conditions;
4033
  public:
4034
  DEFINE_SIZE_ARRAY (3, conditions);
4035
};
4036
4037
struct ConditionOr
4038
{
4039
  friend struct Condition;
4040
4041
  bool subset (hb_subset_context_t *c) const
4042
0
  {
4043
0
    TRACE_SUBSET (this);
4044
    // TODO(subset)
4045
0
    return_trace (false);
4046
0
  }
Unexecuted instantiation: OT::ConditionOr::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::ConditionOr::subset(hb_subset_context_t*) const
4047
4048
  private:
4049
  template <typename Instancer>
4050
  bool evaluate (const int *coords, unsigned int coord_len,
4051
     Instancer *instancer) const
4052
0
  {
4053
0
    unsigned int count = conditions.len;
4054
0
    for (unsigned int i = 0; i < count; i++)
4055
0
      if (_hb_recurse_condition_evaluate (this+conditions.arrayZ[i],
4056
0
            coords, coord_len,
4057
0
            instancer))
4058
0
  return true;
4059
0
    return false;
4060
0
  }
4061
4062
  bool subset (hb_subset_context_t *c,
4063
               hb_subset_layout_context_t *l,
4064
               bool insert_catch_all) const
4065
0
  {
4066
0
    TRACE_SUBSET (this);
4067
0
    // TODO(subset)
4068
0
    return_trace (false);
4069
0
  }
4070
4071
  bool sanitize (hb_sanitize_context_t *c) const
4072
0
  {
4073
0
    TRACE_SANITIZE (this);
4074
0
    return_trace (conditions.sanitize (c, this));
4075
0
  }
4076
4077
  protected:
4078
  HBUINT16  format;   /* Format identifier--format = 4 */
4079
  Array8OfOffset24To<struct Condition>  conditions;
4080
  public:
4081
  DEFINE_SIZE_ARRAY (3, conditions);
4082
};
4083
4084
struct ConditionNegate
4085
{
4086
  friend struct Condition;
4087
4088
  bool subset (hb_subset_context_t *c) const
4089
0
  {
4090
0
    TRACE_SUBSET (this);
4091
    // TODO(subset)
4092
0
    return_trace (false);
4093
0
  }
Unexecuted instantiation: OT::ConditionNegate::subset(hb_subset_context_t*) const
Unexecuted instantiation: OT::ConditionNegate::subset(hb_subset_context_t*) const
4094
4095
  private:
4096
  template <typename Instancer>
4097
  bool evaluate (const int *coords, unsigned int coord_len,
4098
     Instancer *instancer) const
4099
0
  {
4100
0
    return !_hb_recurse_condition_evaluate (this+condition,
4101
0
              coords, coord_len,
4102
0
              instancer);
4103
0
  }
4104
4105
  bool subset (hb_subset_context_t *c,
4106
               hb_subset_layout_context_t *l,
4107
               bool insert_catch_all) const
4108
0
  {
4109
0
    TRACE_SUBSET (this);
4110
0
    // TODO(subset)
4111
0
    return_trace (false);
4112
0
  }
4113
4114
  bool sanitize (hb_sanitize_context_t *c) const
4115
0
  {
4116
0
    TRACE_SANITIZE (this);
4117
0
    return_trace (condition.sanitize (c, this));
4118
0
  }
4119
4120
  protected:
4121
  HBUINT16  format;   /* Format identifier--format = 5 */
4122
  Offset24To<struct Condition>  condition;
4123
  public:
4124
  DEFINE_SIZE_STATIC (5);
4125
};
4126
4127
struct Condition
4128
{
4129
  template <typename Instancer>
4130
  bool evaluate (const int *coords, unsigned int coord_len,
4131
     Instancer *instancer) const
4132
0
  {
4133
0
    switch (u.format) {
4134
0
    case 1: hb_barrier (); return u.format1.evaluate (coords, coord_len, instancer);
4135
0
    case 2: hb_barrier (); return u.format2.evaluate (coords, coord_len, instancer);
4136
0
    case 3: hb_barrier (); return u.format3.evaluate (coords, coord_len, instancer);
4137
0
    case 4: hb_barrier (); return u.format4.evaluate (coords, coord_len, instancer);
4138
0
    case 5: hb_barrier (); return u.format5.evaluate (coords, coord_len, instancer);
4139
0
    default:return false;
4140
0
    }
4141
0
  }
4142
4143
  Cond_with_Var_flag_t keep_with_variations (hb_collect_feature_substitutes_with_var_context_t *c,
4144
                                             hb_map_t *condition_map /* OUT */) const
4145
0
  {
4146
0
    switch (u.format) {
4147
0
    case 1: hb_barrier (); return u.format1.keep_with_variations (c, condition_map);
4148
    // TODO(subset)
4149
0
    default: c->apply = false; return KEEP_COND_WITH_VAR;
4150
0
    }
4151
0
  }
4152
4153
  template <typename context_t, typename ...Ts>
4154
  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
4155
0
  {
4156
0
    if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value ();
4157
0
    TRACE_DISPATCH (this, u.format);
4158
0
    switch (u.format) {
4159
0
    case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
4160
0
    case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
4161
0
    case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
4162
0
    case 4: hb_barrier (); return_trace (c->dispatch (u.format4, std::forward<Ts> (ds)...));
4163
0
    case 5: hb_barrier (); return_trace (c->dispatch (u.format5, std::forward<Ts> (ds)...));
4164
0
    default:return_trace (c->default_return_value ());
4165
0
    }
4166
0
  }
Unexecuted instantiation: hb_subset_context_t::return_t OT::Condition::dispatch<hb_subset_context_t>(hb_subset_context_t*) const
Unexecuted instantiation: hb_subset_context_t::return_t OT::Condition::dispatch<hb_subset_context_t>(hb_subset_context_t*) const
4167
4168
  bool sanitize (hb_sanitize_context_t *c) const
4169
0
  {
4170
0
    TRACE_SANITIZE (this);
4171
0
    if (!u.format.sanitize (c)) return_trace (false);
4172
0
    hb_barrier ();
4173
0
    switch (u.format) {
4174
0
    case 1: hb_barrier (); return_trace (u.format1.sanitize (c));
4175
0
    case 2: hb_barrier (); return_trace (u.format2.sanitize (c));
4176
0
    case 3: hb_barrier (); return_trace (u.format3.sanitize (c));
4177
0
    case 4: hb_barrier (); return_trace (u.format4.sanitize (c));
4178
0
    case 5: hb_barrier (); return_trace (u.format5.sanitize (c));
4179
0
    default:return_trace (true);
4180
0
    }
4181
0
  }
4182
4183
  protected:
4184
  union {
4185
  HBUINT16    format;   /* Format identifier */
4186
  ConditionAxisRange  format1;
4187
  ConditionValue  format2;
4188
  ConditionAnd    format3;
4189
  ConditionOr   format4;
4190
  ConditionNegate format5;
4191
  } u;
4192
  public:
4193
  DEFINE_SIZE_UNION (2, format);
4194
};
4195
4196
template <typename Instancer>
4197
bool
4198
_hb_recurse_condition_evaluate (const struct Condition &condition,
4199
        const int *coords,
4200
        unsigned int coord_len,
4201
        Instancer *instancer)
4202
0
{
4203
0
  return condition.evaluate (coords, coord_len, instancer);
4204
0
}
Unexecuted instantiation: hb-face.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-face.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-shape.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-shaper-arabic.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-static.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: gsubgpos-context.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-aat-layout.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-aat-map.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-font.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-font.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-layout.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-metrics.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-shape-fallback.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-var.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-cff1.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-cff2.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-plan.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-cff1-table.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-ot-cff2-table.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-cff-common.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-plan-layout.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
Unexecuted instantiation: hb-subset-plan-var.cc:bool OT::_hb_recurse_condition_evaluate<OT::ItemVarStoreInstancer>(OT::Condition const&, int const*, unsigned int, OT::ItemVarStoreInstancer*)
4205
4206
struct ConditionList
4207
{
4208
  const Condition& operator[] (unsigned i) const
4209
0
  { return this+conditions[i]; }
4210
4211
  bool sanitize (hb_sanitize_context_t *c) const
4212
0
  {
4213
0
    TRACE_SANITIZE (this);
4214
0
    return_trace (conditions.sanitize (c, this));
4215
0
  }
4216
4217
  protected:
4218
  Array32OfOffset32To<Condition> conditions;
4219
  public:
4220
  DEFINE_SIZE_ARRAY (4, conditions);
4221
};
4222
4223
struct ConditionSet
4224
{
4225
  bool evaluate (const int *coords, unsigned int coord_len,
4226
     ItemVarStoreInstancer *instancer) const
4227
0
  {
4228
0
    unsigned int count = conditions.len;
4229
0
    for (unsigned int i = 0; i < count; i++)
4230
0
      if (!(this+conditions.arrayZ[i]).evaluate (coords, coord_len, instancer))
4231
0
  return false;
4232
0
    return true;
4233
0
  }
4234
4235
  void keep_with_variations (hb_collect_feature_substitutes_with_var_context_t *c) const
4236
0
  {
4237
0
    hb_map_t *condition_map = hb_map_create ();
4238
0
    if (unlikely (!condition_map)) return;
4239
0
    hb::shared_ptr<hb_map_t> p {condition_map};
4240
4241
0
    hb_set_t *cond_set = hb_set_create ();
4242
0
    if (unlikely (!cond_set)) return;
4243
0
    hb::shared_ptr<hb_set_t> s {cond_set};
4244
4245
0
    c->apply = true;
4246
0
    bool should_keep = false;
4247
0
    unsigned num_kept_cond = 0, cond_idx = 0;
4248
0
    for (const auto& offset : conditions)
4249
0
    {
4250
0
      Cond_with_Var_flag_t ret = (this+offset).keep_with_variations (c, condition_map);
4251
      // condition is not met or condition out of range, drop the entire record
4252
0
      if (ret == DROP_RECORD_WITH_VAR)
4253
0
        return;
4254
4255
0
      if (ret == KEEP_COND_WITH_VAR)
4256
0
      {
4257
0
        should_keep = true;
4258
0
        cond_set->add (cond_idx);
4259
0
        num_kept_cond++;
4260
0
      }
4261
4262
0
      if (ret == KEEP_RECORD_WITH_VAR)
4263
0
        should_keep = true;
4264
4265
0
      cond_idx++;
4266
0
    }
4267
4268
0
    if (!should_keep) return;
4269
4270
    //check if condition_set is unique with variations
4271
0
    if (c->conditionset_map->has (p))
4272
      //duplicate found, drop the entire record
4273
0
      return;
4274
4275
0
    c->conditionset_map->set (p, 1);
4276
0
    c->record_cond_idx_map->set (c->cur_record_idx, s);
4277
0
    if (should_keep && num_kept_cond == 0)
4278
0
      c->universal = true;
4279
0
  }
Unexecuted instantiation: OT::ConditionSet::keep_with_variations(OT::hb_collect_feature_substitutes_with_var_context_t*) const
Unexecuted instantiation: OT::ConditionSet::keep_with_variations(OT::hb_collect_feature_substitutes_with_var_context_t*) const
4280
4281
  bool subset (hb_subset_context_t *c,
4282
               hb_subset_layout_context_t *l,
4283
               bool insert_catch_all) const
4284
0
  {
4285
0
    TRACE_SUBSET (this);
4286
0
    auto *out = c->serializer->start_embed (this);
4287
0
    if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false);
4288
4289
0
    if (insert_catch_all) return_trace (true);
4290
4291
0
    hb_set_t *retained_cond_set = nullptr;
4292
0
    if (l->feature_record_cond_idx_map != nullptr)
4293
0
      retained_cond_set = l->feature_record_cond_idx_map->get (l->cur_feature_var_record_idx);
4294
4295
0
    unsigned int count = conditions.len;
4296
0
    for (unsigned int i = 0; i < count; i++)
4297
0
    {
4298
0
      if (retained_cond_set != nullptr && !retained_cond_set->has (i))
4299
0
        continue;
4300
0
      subset_offset_array (c, out->conditions, this) (conditions[i]);
4301
0
    }
4302
4303
0
    return_trace (bool (out->conditions));
4304
0
  }
Unexecuted instantiation: OT::ConditionSet::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, bool) const
Unexecuted instantiation: OT::ConditionSet::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, bool) const
4305
4306
  bool sanitize (hb_sanitize_context_t *c) const
4307
0
  {
4308
0
    TRACE_SANITIZE (this);
4309
0
    return_trace (conditions.sanitize (c, this));
4310
0
  }
4311
4312
  protected:
4313
  Array16OfOffset32To<Condition>  conditions;
4314
  public:
4315
  DEFINE_SIZE_ARRAY (2, conditions);
4316
};
4317
4318
struct FeatureTableSubstitutionRecord
4319
{
4320
  friend struct FeatureTableSubstitution;
4321
4322
  void collect_lookups (const void *base, hb_set_t *lookup_indexes /* OUT */) const
4323
0
  {
4324
0
    return (base+feature).add_lookup_indexes_to (lookup_indexes);
4325
0
  }
4326
4327
  void closure_features (const void *base,
4328
       const hb_map_t *lookup_indexes,
4329
       hb_set_t       *feature_indexes /* OUT */) const
4330
0
  {
4331
0
    if ((base+feature).intersects_lookup_indexes (lookup_indexes))
4332
0
      feature_indexes->add (featureIndex);
4333
0
  }
4334
4335
  void collect_feature_substitutes_with_variations (hb_hashmap_t<unsigned, const Feature*> *feature_substitutes_map,
4336
                                                    hb_set_t& catch_all_record_feature_idxes,
4337
                                                    const hb_set_t *feature_indices,
4338
                                                    const void *base) const
4339
0
  {
4340
0
    if (feature_indices->has (featureIndex))
4341
0
    {
4342
0
      feature_substitutes_map->set (featureIndex, &(base+feature));
4343
0
      catch_all_record_feature_idxes.add (featureIndex);
4344
0
    }
4345
0
  }
4346
4347
  bool serialize (hb_subset_layout_context_t *c,
4348
                  unsigned feature_index,
4349
                  const Feature *f, const Tag *tag)
4350
0
  {
4351
0
    TRACE_SERIALIZE (this);
4352
0
    hb_serialize_context_t *s = c->subset_context->serializer;
4353
0
    if (unlikely (!s->extend_min (this))) return_trace (false);
4354
4355
0
    uint32_t *new_feature_idx;
4356
0
    if (!c->feature_index_map->has (feature_index, &new_feature_idx))
4357
0
      return_trace (false);
4358
4359
0
    if (!s->check_assign (featureIndex, *new_feature_idx, HB_SERIALIZE_ERROR_INT_OVERFLOW))
4360
0
      return_trace (false);
4361
4362
0
    s->push ();
4363
0
    bool ret = f->subset (c->subset_context, c, tag);
4364
0
    if (ret) s->add_link (feature, s->pop_pack ());
4365
0
    else s->pop_discard ();
4366
4367
0
    return_trace (ret);
4368
0
  }
Unexecuted instantiation: OT::FeatureTableSubstitutionRecord::serialize(OT::hb_subset_layout_context_t*, unsigned int, OT::Feature const*, OT::Tag const*)
Unexecuted instantiation: OT::FeatureTableSubstitutionRecord::serialize(OT::hb_subset_layout_context_t*, unsigned int, OT::Feature const*, OT::Tag const*)
4369
4370
  bool subset (hb_subset_layout_context_t *c, const void *base) const
4371
0
  {
4372
0
    TRACE_SUBSET (this);
4373
0
    uint32_t *new_feature_index;
4374
0
    if (!c->feature_index_map->has (featureIndex, &new_feature_index))
4375
0
      return_trace (false);
4376
4377
0
    auto *out = c->subset_context->serializer->embed (this);
4378
0
    if (unlikely (!out)) return_trace (false);
4379
4380
0
    out->featureIndex = *new_feature_index;
4381
0
    return_trace (out->feature.serialize_subset (c->subset_context, feature, base, c));
4382
0
  }
Unexecuted instantiation: OT::FeatureTableSubstitutionRecord::subset(OT::hb_subset_layout_context_t*, void const*) const
Unexecuted instantiation: OT::FeatureTableSubstitutionRecord::subset(OT::hb_subset_layout_context_t*, void const*) const
4383
4384
  bool sanitize (hb_sanitize_context_t *c, const void *base) const
4385
0
  {
4386
0
    TRACE_SANITIZE (this);
4387
0
    return_trace (c->check_struct (this) && feature.sanitize (c, base));
4388
0
  }
4389
4390
  protected:
4391
  HBUINT16    featureIndex;
4392
  Offset32To<Feature> feature;
4393
  public:
4394
  DEFINE_SIZE_STATIC (6);
4395
};
4396
4397
struct FeatureTableSubstitution
4398
{
4399
  const Feature *find_substitute (unsigned int feature_index) const
4400
0
  {
4401
0
    unsigned int count = substitutions.len;
4402
0
    for (unsigned int i = 0; i < count; i++)
4403
0
    {
4404
0
      const FeatureTableSubstitutionRecord &record = substitutions.arrayZ[i];
4405
0
      if (record.featureIndex == feature_index)
4406
0
  return &(this+record.feature);
4407
0
    }
4408
0
    return nullptr;
4409
0
  }
4410
4411
  void collect_lookups (const hb_set_t *feature_indexes,
4412
      hb_set_t       *lookup_indexes /* OUT */) const
4413
0
  {
4414
0
    + hb_iter (substitutions)
4415
0
    | hb_filter (feature_indexes, &FeatureTableSubstitutionRecord::featureIndex)
4416
0
    | hb_apply ([this, lookup_indexes] (const FeatureTableSubstitutionRecord& r)
4417
0
    { r.collect_lookups (this, lookup_indexes); })
4418
0
    ;
4419
0
  }
4420
4421
  void closure_features (const hb_map_t *lookup_indexes,
4422
       hb_set_t       *feature_indexes /* OUT */) const
4423
0
  {
4424
0
    for (const FeatureTableSubstitutionRecord& record : substitutions)
4425
0
      record.closure_features (this, lookup_indexes, feature_indexes);
4426
0
  }
4427
4428
  bool intersects_features (const hb_map_t *feature_index_map) const
4429
0
  {
4430
0
    for (const FeatureTableSubstitutionRecord& record : substitutions)
4431
0
    {
4432
0
      if (feature_index_map->has (record.featureIndex)) return true;
4433
0
    }
4434
0
    return false;
4435
0
  }
4436
4437
  void collect_feature_substitutes_with_variations (hb_collect_feature_substitutes_with_var_context_t *c) const
4438
0
  {
4439
0
    for (const FeatureTableSubstitutionRecord& record : substitutions)
4440
0
      record.collect_feature_substitutes_with_variations (c->feature_substitutes_map,
4441
0
                                                          c->catch_all_record_feature_idxes,
4442
0
                                                          c->feature_indices, this);
4443
0
  }
4444
4445
  bool subset (hb_subset_context_t        *c,
4446
         hb_subset_layout_context_t *l,
4447
               bool insert_catch_all) const
4448
0
  {
4449
0
    TRACE_SUBSET (this);
4450
0
    auto *out = c->serializer->start_embed (*this);
4451
0
    if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false);
4452
4453
0
    out->version.major = version.major;
4454
0
    out->version.minor = version.minor;
4455
4456
0
    if (insert_catch_all)
4457
0
    {
4458
0
      for (unsigned feature_index : *(l->catch_all_record_feature_idxes))
4459
0
      {
4460
0
        hb_pair_t<const void*, const void*> *p;
4461
0
        if (!l->feature_idx_tag_map->has (feature_index, &p))
4462
0
          return_trace (false);
4463
0
        auto *o = out->substitutions.serialize_append (c->serializer);
4464
0
        if (!o->serialize (l, feature_index,
4465
0
                           reinterpret_cast<const Feature*> (p->first),
4466
0
                           reinterpret_cast<const Tag*> (p->second)))
4467
0
          return_trace (false);
4468
0
      }
4469
0
      return_trace (true);
4470
0
    }
4471
4472
0
    + substitutions.iter ()
4473
0
    | hb_apply (subset_record_array (l, &(out->substitutions), this))
4474
0
    ;
4475
4476
0
    return_trace (bool (out->substitutions));
4477
0
  }
Unexecuted instantiation: OT::FeatureTableSubstitution::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, bool) const
Unexecuted instantiation: OT::FeatureTableSubstitution::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, bool) const
4478
4479
  bool sanitize (hb_sanitize_context_t *c) const
4480
0
  {
4481
0
    TRACE_SANITIZE (this);
4482
0
    return_trace (version.sanitize (c) &&
4483
0
      hb_barrier () &&
4484
0
      likely (version.major == 1) &&
4485
0
      substitutions.sanitize (c, this));
4486
0
  }
4487
4488
  protected:
4489
  FixedVersion<>  version;  /* Version--0x00010000u */
4490
  Array16Of<FeatureTableSubstitutionRecord>
4491
      substitutions;
4492
  public:
4493
  DEFINE_SIZE_ARRAY (6, substitutions);
4494
};
4495
4496
struct FeatureVariationRecord
4497
{
4498
  friend struct FeatureVariations;
4499
4500
  void collect_lookups (const void     *base,
4501
      const hb_set_t *feature_indexes,
4502
      hb_set_t       *lookup_indexes /* OUT */) const
4503
0
  {
4504
0
    return (base+substitutions).collect_lookups (feature_indexes, lookup_indexes);
4505
0
  }
4506
4507
  void closure_features (const void     *base,
4508
       const hb_map_t *lookup_indexes,
4509
       hb_set_t       *feature_indexes /* OUT */) const
4510
0
  {
4511
0
    (base+substitutions).closure_features (lookup_indexes, feature_indexes);
4512
0
  }
4513
4514
  bool intersects_features (const void *base, const hb_map_t *feature_index_map) const
4515
0
  {
4516
0
    return (base+substitutions).intersects_features (feature_index_map);
4517
0
  }
4518
4519
  void collect_feature_substitutes_with_variations (hb_collect_feature_substitutes_with_var_context_t *c,
4520
                                                    const void *base) const
4521
0
  {
4522
0
    (base+conditions).keep_with_variations (c);
4523
0
    if (c->apply && !c->variation_applied)
4524
0
    {
4525
0
      (base+substitutions).collect_feature_substitutes_with_variations (c);
4526
0
      c->variation_applied = true; // set variations only once
4527
0
    }
4528
0
  }
4529
4530
  bool subset (hb_subset_layout_context_t *c, const void *base,
4531
               bool insert_catch_all = false) const
4532
0
  {
4533
0
    TRACE_SUBSET (this);
4534
0
    auto *out = c->subset_context->serializer->embed (this);
4535
0
    if (unlikely (!out)) return_trace (false);
4536
4537
0
    out->conditions.serialize_subset (c->subset_context, conditions, base, c, insert_catch_all);
4538
0
    out->substitutions.serialize_subset (c->subset_context, substitutions, base, c, insert_catch_all);
4539
4540
0
    return_trace (true);
4541
0
  }
Unexecuted instantiation: OT::FeatureVariationRecord::subset(OT::hb_subset_layout_context_t*, void const*, bool) const
Unexecuted instantiation: OT::FeatureVariationRecord::subset(OT::hb_subset_layout_context_t*, void const*, bool) const
4542
4543
  bool sanitize (hb_sanitize_context_t *c, const void *base) const
4544
0
  {
4545
0
    TRACE_SANITIZE (this);
4546
0
    return_trace (conditions.sanitize (c, base) &&
4547
0
      substitutions.sanitize (c, base));
4548
0
  }
4549
4550
  protected:
4551
  Offset32To<ConditionSet>
4552
      conditions;
4553
  Offset32To<FeatureTableSubstitution>
4554
      substitutions;
4555
  public:
4556
  DEFINE_SIZE_STATIC (8);
4557
};
4558
4559
struct FeatureVariations
4560
{
4561
  static constexpr unsigned NOT_FOUND_INDEX = 0xFFFFFFFFu;
4562
4563
  bool find_index (const int *coords, unsigned int coord_len,
4564
       unsigned int *index,
4565
       ItemVarStoreInstancer *instancer) const
4566
0
  {
4567
0
    unsigned int count = varRecords.len;
4568
0
    for (unsigned int i = 0; i < count; i++)
4569
0
    {
4570
0
      const FeatureVariationRecord &record = varRecords.arrayZ[i];
4571
0
      if ((this+record.conditions).evaluate (coords, coord_len, instancer))
4572
0
      {
4573
0
  *index = i;
4574
0
  return true;
4575
0
      }
4576
0
    }
4577
0
    *index = NOT_FOUND_INDEX;
4578
0
    return false;
4579
0
  }
4580
4581
  const Feature *find_substitute (unsigned int variations_index,
4582
          unsigned int feature_index) const
4583
0
  {
4584
0
    const FeatureVariationRecord &record = varRecords[variations_index];
4585
0
    return (this+record.substitutions).find_substitute (feature_index);
4586
0
  }
4587
4588
  void collect_feature_substitutes_with_variations (hb_collect_feature_substitutes_with_var_context_t *c) const
4589
0
  {
4590
0
    unsigned int count = varRecords.len;
4591
0
    for (unsigned int i = 0; i < count; i++)
4592
0
    {
4593
0
      c->cur_record_idx = i;
4594
0
      varRecords[i].collect_feature_substitutes_with_variations (c, this);
4595
0
      if (c->universal)
4596
0
        break;
4597
0
    }
4598
0
    if (c->universal || c->record_cond_idx_map->is_empty ())
4599
0
      c->catch_all_record_feature_idxes.reset ();
4600
0
  }
4601
4602
  FeatureVariations* copy (hb_serialize_context_t *c) const
4603
0
  {
4604
0
    TRACE_SERIALIZE (this);
4605
0
    return_trace (c->embed (*this));
4606
0
  }
4607
4608
  void collect_lookups (const hb_set_t *feature_indexes,
4609
      const hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map,
4610
      hb_set_t       *lookup_indexes /* OUT */) const
4611
0
  {
4612
0
    unsigned count = varRecords.len;
4613
0
    for (unsigned int i = 0; i < count; i++)
4614
0
    {
4615
0
      if (feature_record_cond_idx_map &&
4616
0
          !feature_record_cond_idx_map->has (i))
4617
0
        continue;
4618
0
      varRecords[i].collect_lookups (this, feature_indexes, lookup_indexes);
4619
0
    }
4620
0
  }
4621
4622
  void closure_features (const hb_map_t *lookup_indexes,
4623
       const hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map,
4624
       hb_set_t       *feature_indexes /* OUT */) const
4625
0
  {
4626
0
    unsigned int count = varRecords.len;
4627
0
    for (unsigned int i = 0; i < count; i++)
4628
0
    {
4629
0
      if (feature_record_cond_idx_map != nullptr &&
4630
0
          !feature_record_cond_idx_map->has (i))
4631
0
        continue;
4632
0
      varRecords[i].closure_features (this, lookup_indexes, feature_indexes);
4633
0
    }
4634
0
  }
4635
4636
  bool subset (hb_subset_context_t *c,
4637
         hb_subset_layout_context_t *l) const
4638
0
  {
4639
0
    TRACE_SUBSET (this);
4640
0
    auto *out = c->serializer->start_embed (*this);
4641
0
    if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false);
4642
4643
0
    out->version.major = version.major;
4644
0
    out->version.minor = version.minor;
4645
4646
0
    int keep_up_to = -1;
4647
0
    for (int i = varRecords.len - 1; i >= 0; i--) {
4648
0
      if (varRecords[i].intersects_features (this, l->feature_index_map)) {
4649
0
        keep_up_to = i;
4650
0
        break;
4651
0
      }
4652
0
    }
4653
4654
0
    unsigned count = (unsigned) (keep_up_to + 1);
4655
0
    for (unsigned i = 0; i < count; i++)
4656
0
    {
4657
0
      if (l->feature_record_cond_idx_map != nullptr &&
4658
0
          !l->feature_record_cond_idx_map->has (i))
4659
0
        continue;
4660
4661
0
      l->cur_feature_var_record_idx = i;
4662
0
      subset_record_array (l, &(out->varRecords), this) (varRecords[i]);
4663
0
    }
4664
4665
0
    if (out->varRecords.len && !l->catch_all_record_feature_idxes->is_empty ())
4666
0
    {
4667
0
      bool insert_catch_all_record = true;
4668
0
      subset_record_array (l, &(out->varRecords), this, insert_catch_all_record) (varRecords[0]);
4669
0
    }
4670
4671
0
    return_trace (bool (out->varRecords));
4672
0
  }
Unexecuted instantiation: OT::FeatureVariations::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
Unexecuted instantiation: OT::FeatureVariations::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*) const
4673
4674
  bool sanitize (hb_sanitize_context_t *c) const
4675
0
  {
4676
0
    TRACE_SANITIZE (this);
4677
0
    return_trace (version.sanitize (c) &&
4678
0
      hb_barrier () &&
4679
0
      likely (version.major == 1) &&
4680
0
      varRecords.sanitize (c, this));
4681
0
  }
4682
4683
  protected:
4684
  FixedVersion<>  version;  /* Version--0x00010000u */
4685
  Array32Of<FeatureVariationRecord>
4686
      varRecords;
4687
  public:
4688
  DEFINE_SIZE_ARRAY_SIZED (8, varRecords);
4689
};
4690
4691
4692
/*
4693
 * Device Tables
4694
 */
4695
4696
struct HintingDevice
4697
{
4698
  friend struct Device;
4699
4700
  private:
4701
4702
  hb_position_t get_x_delta (hb_font_t *font) const
4703
0
  { return get_delta (font->x_ppem, font->x_scale); }
4704
4705
  hb_position_t get_y_delta (hb_font_t *font) const
4706
0
  { return get_delta (font->y_ppem, font->y_scale); }
4707
4708
  public:
4709
4710
  unsigned int get_size () const
4711
0
  {
4712
0
    unsigned int f = deltaFormat;
4713
0
    if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * HBUINT16::static_size;
4714
0
    return HBUINT16::static_size * (4 + ((endSize - startSize) >> (4 - f)));
4715
0
  }
4716
4717
  bool sanitize (hb_sanitize_context_t *c) const
4718
0
  {
4719
0
    TRACE_SANITIZE (this);
4720
0
    return_trace (c->check_struct (this) && c->check_range (this, this->get_size ()));
4721
0
  }
4722
4723
  HintingDevice* copy (hb_serialize_context_t *c) const
4724
0
  {
4725
0
    TRACE_SERIALIZE (this);
4726
0
    return_trace (c->embed<HintingDevice> (this));
4727
0
  }
Unexecuted instantiation: OT::HintingDevice::copy(hb_serialize_context_t*) const
Unexecuted instantiation: OT::HintingDevice::copy(hb_serialize_context_t*) const
4728
4729
  private:
4730
4731
  int get_delta (unsigned int ppem, int scale) const
4732
0
  {
4733
0
    if (!ppem) return 0;
4734
4735
0
    int pixels = get_delta_pixels (ppem);
4736
4737
0
    if (!pixels) return 0;
4738
4739
0
    return (int) (pixels * (int64_t) scale / ppem);
4740
0
  }
4741
  int get_delta_pixels (unsigned int ppem_size) const
4742
0
  {
4743
0
    unsigned int f = deltaFormat;
4744
0
    if (unlikely (f < 1 || f > 3))
4745
0
      return 0;
4746
4747
0
    if (ppem_size < startSize || ppem_size > endSize)
4748
0
      return 0;
4749
4750
0
    unsigned int s = ppem_size - startSize;
4751
4752
0
    unsigned int byte = deltaValueZ[s >> (4 - f)];
4753
0
    unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)));
4754
0
    unsigned int mask = (0xFFFFu >> (16 - (1 << f)));
4755
4756
0
    int delta = bits & mask;
4757
4758
0
    if ((unsigned int) delta >= ((mask + 1) >> 1))
4759
0
      delta -= mask + 1;
4760
4761
0
    return delta;
4762
0
  }
4763
4764
  protected:
4765
  HBUINT16  startSize;    /* Smallest size to correct--in ppem */
4766
  HBUINT16  endSize;    /* Largest size to correct--in ppem */
4767
  HBUINT16  deltaFormat;    /* Format of DeltaValue array data: 1, 2, or 3
4768
           * 1  Signed 2-bit value, 8 values per uint16
4769
           * 2  Signed 4-bit value, 4 values per uint16
4770
           * 3  Signed 8-bit value, 2 values per uint16
4771
           */
4772
  UnsizedArrayOf<HBUINT16>
4773
    deltaValueZ;    /* Array of compressed data */
4774
  public:
4775
  DEFINE_SIZE_ARRAY (6, deltaValueZ);
4776
};
4777
4778
struct VariationDevice
4779
{
4780
  friend struct Device;
4781
4782
  private:
4783
4784
  hb_position_t get_x_delta (hb_font_t *font,
4785
           const ItemVariationStore &store,
4786
           ItemVariationStore::cache_t *store_cache = nullptr) const
4787
0
  { return !font->num_coords ? 0 : font->em_scalef_x (get_delta (font, store, store_cache)); }
4788
4789
  hb_position_t get_y_delta (hb_font_t *font,
4790
           const ItemVariationStore &store,
4791
           ItemVariationStore::cache_t *store_cache = nullptr) const
4792
0
  { return !font->num_coords ? 0 : font->em_scalef_y (get_delta (font, store, store_cache)); }
4793
4794
  VariationDevice* copy (hb_serialize_context_t *c,
4795
                         const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map) const
4796
0
  {
4797
0
    TRACE_SERIALIZE (this);
4798
0
    if (!layout_variation_idx_delta_map) return_trace (nullptr);
4799
4800
0
    hb_pair_t<unsigned, int> *v;
4801
0
    if (!layout_variation_idx_delta_map->has (varIdx, &v))
4802
0
      return_trace (nullptr);
4803
4804
0
    c->start_zerocopy (this->static_size);
4805
0
    auto *out = c->embed (this);
4806
0
    if (unlikely (!out)) return_trace (nullptr);
4807
4808
0
    if (!c->check_assign (out->varIdx, hb_first (*v), HB_SERIALIZE_ERROR_INT_OVERFLOW))
4809
0
      return_trace (nullptr);
4810
0
    return_trace (out);
4811
0
  }
Unexecuted instantiation: OT::VariationDevice::copy(hb_serialize_context_t*, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*) const
Unexecuted instantiation: OT::VariationDevice::copy(hb_serialize_context_t*, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*) const
4812
4813
  void collect_variation_index (hb_collect_variation_indices_context_t *c) const
4814
0
  { c->layout_variation_indices->add (varIdx); }
4815
4816
  bool sanitize (hb_sanitize_context_t *c) const
4817
0
  {
4818
0
    TRACE_SANITIZE (this);
4819
0
    return_trace (c->check_struct (this));
4820
0
  }
4821
4822
  private:
4823
4824
  float get_delta (hb_font_t *font,
4825
       const ItemVariationStore &store,
4826
       ItemVariationStore::cache_t *store_cache = nullptr) const
4827
0
  {
4828
0
    return store.get_delta (varIdx, font->coords, font->num_coords, (ItemVariationStore::cache_t *) store_cache);
4829
0
  }
4830
4831
  protected:
4832
  VarIdx  varIdx;   /* Variation index */
4833
  HBUINT16  deltaFormat;  /* Format identifier for this table: 0x0x8000 */
4834
  public:
4835
  DEFINE_SIZE_STATIC (6);
4836
};
4837
4838
struct DeviceHeader
4839
{
4840
  protected:
4841
  HBUINT16    reserved1;
4842
  HBUINT16    reserved2;
4843
  public:
4844
  HBUINT16    format;   /* Format identifier */
4845
  public:
4846
  DEFINE_SIZE_STATIC (6);
4847
};
4848
4849
struct Device
4850
{
4851
  hb_position_t get_x_delta (hb_font_t *font,
4852
           const ItemVariationStore &store=Null (ItemVariationStore),
4853
           ItemVariationStore::cache_t *store_cache = nullptr) const
4854
0
  {
4855
0
    switch (u.b.format)
4856
0
    {
4857
0
#ifndef HB_NO_HINTING
4858
0
    case 1: case 2: case 3:
4859
0
      return u.hinting.get_x_delta (font);
4860
0
#endif
4861
0
#ifndef HB_NO_VAR
4862
0
    case 0x8000:
4863
0
      return u.variation.get_x_delta (font, store, store_cache);
4864
0
#endif
4865
0
    default:
4866
0
      return 0;
4867
0
    }
4868
0
  }
4869
  hb_position_t get_y_delta (hb_font_t *font,
4870
           const ItemVariationStore &store=Null (ItemVariationStore),
4871
           ItemVariationStore::cache_t *store_cache = nullptr) const
4872
0
  {
4873
0
    switch (u.b.format)
4874
0
    {
4875
0
    case 1: case 2: case 3:
4876
0
#ifndef HB_NO_HINTING
4877
0
      return u.hinting.get_y_delta (font);
4878
0
#endif
4879
0
#ifndef HB_NO_VAR
4880
0
    case 0x8000:
4881
0
      return u.variation.get_y_delta (font, store, store_cache);
4882
0
#endif
4883
0
    default:
4884
0
      return 0;
4885
0
    }
4886
0
  }
4887
4888
  bool sanitize (hb_sanitize_context_t *c) const
4889
0
  {
4890
0
    TRACE_SANITIZE (this);
4891
0
    if (!u.b.format.sanitize (c)) return_trace (false);
4892
0
    switch (u.b.format) {
4893
0
#ifndef HB_NO_HINTING
4894
0
    case 1: case 2: case 3:
4895
0
      return_trace (u.hinting.sanitize (c));
4896
0
#endif
4897
0
#ifndef HB_NO_VAR
4898
0
    case 0x8000:
4899
0
      return_trace (u.variation.sanitize (c));
4900
0
#endif
4901
0
    default:
4902
0
      return_trace (true);
4903
0
    }
4904
0
  }
4905
4906
  Device* copy (hb_serialize_context_t *c,
4907
                const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map=nullptr) const
4908
0
  {
4909
0
    TRACE_SERIALIZE (this);
4910
0
    switch (u.b.format) {
4911
0
#ifndef HB_NO_HINTING
4912
0
    case 1:
4913
0
    case 2:
4914
0
    case 3:
4915
0
      return_trace (reinterpret_cast<Device *> (u.hinting.copy (c)));
4916
0
#endif
4917
0
#ifndef HB_NO_VAR
4918
0
    case 0x8000:
4919
0
      return_trace (reinterpret_cast<Device *> (u.variation.copy (c, layout_variation_idx_delta_map)));
4920
0
#endif
4921
0
    default:
4922
0
      return_trace (nullptr);
4923
0
    }
4924
0
  }
Unexecuted instantiation: OT::Device::copy(hb_serialize_context_t*, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*) const
Unexecuted instantiation: OT::Device::copy(hb_serialize_context_t*, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*) const
4925
4926
  void collect_variation_indices (hb_collect_variation_indices_context_t *c) const
4927
0
  {
4928
0
    switch (u.b.format) {
4929
0
#ifndef HB_NO_HINTING
4930
0
    case 1:
4931
0
    case 2:
4932
0
    case 3:
4933
0
      return;
4934
0
#endif
4935
0
#ifndef HB_NO_VAR
4936
0
    case 0x8000:
4937
0
      u.variation.collect_variation_index (c);
4938
0
      return;
4939
0
#endif
4940
0
    default:
4941
0
      return;
4942
0
    }
4943
0
  }
4944
4945
  unsigned get_variation_index () const
4946
0
  {
4947
0
    switch (u.b.format) {
4948
0
#ifndef HB_NO_VAR
4949
0
    case 0x8000:
4950
0
      return u.variation.varIdx;
4951
0
#endif
4952
0
    default:
4953
0
      return HB_OT_LAYOUT_NO_VARIATIONS_INDEX;
4954
0
    }
4955
0
  }
Unexecuted instantiation: OT::Device::get_variation_index() const
Unexecuted instantiation: OT::Device::get_variation_index() const
4956
4957
  protected:
4958
  union {
4959
  DeviceHeader    b;
4960
  HintingDevice   hinting;
4961
#ifndef HB_NO_VAR
4962
  VariationDevice variation;
4963
#endif
4964
  } u;
4965
  public:
4966
  DEFINE_SIZE_UNION (6, b);
4967
};
4968
4969
4970
} /* namespace OT */
4971
4972
4973
#endif /* HB_OT_LAYOUT_COMMON_HH */