/src/harfbuzz/src/OT/Layout/GSUB/SingleSubstFormat2.hh
Line | Count | Source |
1 | | #ifndef OT_LAYOUT_GSUB_SINGLESUBSTFORMAT2_HH |
2 | | #define OT_LAYOUT_GSUB_SINGLESUBSTFORMAT2_HH |
3 | | |
4 | | #include "Common.hh" |
5 | | |
6 | | namespace OT { |
7 | | namespace Layout { |
8 | | namespace GSUB_impl { |
9 | | |
10 | | template <typename Types> |
11 | | struct SingleSubstFormat2_4 |
12 | | { |
13 | | protected: |
14 | | HBUINT16 format; /* Format identifier--format = 2 */ |
15 | | typename Types::template LOffsetTo<Coverage> |
16 | | coverage; /* Offset to Coverage table--from |
17 | | * beginning of Substitution table */ |
18 | | typename Types::template ArrayOf<typename Types::HBGlyphID> |
19 | | substitute; /* Array of substitute |
20 | | * GlyphIDs--ordered by Coverage Index */ |
21 | | |
22 | | public: |
23 | | DEFINE_SIZE_ARRAY (2 + Types::LOffset::static_size + Types::HBUINT::static_size, substitute); |
24 | | |
25 | | bool sanitize (hb_sanitize_context_t *c) const |
26 | 38.7k | { |
27 | 38.7k | TRACE_SANITIZE (this); |
28 | 38.7k | return_trace (coverage.sanitize (c, this) && substitute.sanitize (c)); |
29 | 38.7k | } OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::sanitize(hb_sanitize_context_t*) const Line | Count | Source | 26 | 38.7k | { | 27 | 38.7k | TRACE_SANITIZE (this); | 28 | 38.7k | return_trace (coverage.sanitize (c, this) && substitute.sanitize (c)); | 29 | 38.7k | } |
Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::sanitize(hb_sanitize_context_t*) const |
30 | | |
31 | | bool intersects (const hb_set_t *glyphs) const |
32 | 0 | { return (this+coverage).intersects (glyphs); }Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::intersects(hb_set_t const*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::intersects(hb_set_t const*) const |
33 | | |
34 | | bool may_have_non_1to1 () const |
35 | 0 | { return false; }Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::may_have_non_1to1() const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::may_have_non_1to1() const |
36 | | |
37 | | void depend (hb_depend_context_t *c) const |
38 | 0 | { |
39 | 0 | auto &cov = this+coverage; |
40 | 0 | auto &glyph_set = c->parent_active_glyphs (); |
41 | 0 |
|
42 | 0 | // Filter by active glyphs like closure does |
43 | 0 | if (substitute.len > glyph_set.get_population () * 4) |
44 | 0 | { |
45 | 0 | for (auto g : glyph_set) |
46 | 0 | { |
47 | 0 | unsigned i = cov.get_coverage (g); |
48 | 0 | if (i == NOT_COVERED || i >= substitute.len) |
49 | 0 | continue; |
50 | 0 | c->depend_data->add_gsub_lookup (g, c->lookup_index, substitute.arrayZ[i]); |
51 | 0 | } |
52 | 0 |
|
53 | 0 | return; |
54 | 0 | } |
55 | 0 |
|
56 | 0 | + hb_zip (cov, substitute) |
57 | 0 | | hb_filter (glyph_set, hb_first) |
58 | 0 | | hb_apply ([&] (const hb_codepoint_pair_t &_) { c->depend_data->add_gsub_lookup (_.first, c->lookup_index, _.second); }) |
59 | 0 | ; |
60 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::depend(OT::hb_depend_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::depend(OT::hb_depend_context_t*) const |
61 | | |
62 | | void closure (hb_closure_context_t *c) const |
63 | 0 | { |
64 | 0 | auto &cov = this+coverage; |
65 | 0 | auto &glyph_set = c->parent_active_glyphs (); |
66 | |
|
67 | 0 | if (substitute.len > glyph_set.get_population () * 4) |
68 | 0 | { |
69 | 0 | if (unlikely (!c->spend_budget (HB_BUDGET_1, glyph_set.get_population ()))) return; |
70 | 0 | for (auto g : glyph_set) |
71 | 0 | { |
72 | 0 | unsigned i = cov.get_coverage (g); |
73 | 0 | if (i == NOT_COVERED || i >= substitute.len) |
74 | 0 | continue; |
75 | 0 | c->add_output (substitute.arrayZ[i]); |
76 | 0 | } |
77 | |
|
78 | 0 | return; |
79 | 0 | } |
80 | | |
81 | 0 | if (unlikely (!c->spend_budget (HB_BUDGET_1, substitute.len))) return; |
82 | 0 | + hb_zip (cov, substitute) |
83 | 0 | | hb_filter (glyph_set, hb_first) |
84 | 0 | | hb_map (hb_second) |
85 | 0 | | hb_apply ([c] (hb_codepoint_t g) { c->add_output (g); })Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::closure(OT::hb_closure_context_t*) const::{lambda(unsigned int)#1}::operator()(unsigned int) constUnexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::closure(OT::hb_closure_context_t*) const::{lambda(unsigned int)#1}::operator()(unsigned int) const |
86 | 0 | ; |
87 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::closure(OT::hb_closure_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::closure(OT::hb_closure_context_t*) const |
88 | | |
89 | 0 | void closure_lookups (hb_closure_lookups_context_t *c) const {}Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::closure_lookups(OT::hb_closure_lookups_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::closure_lookups(OT::hb_closure_lookups_context_t*) const |
90 | | |
91 | | void collect_glyphs (hb_collect_glyphs_context_t *c) const |
92 | 0 | { |
93 | 0 | if (unlikely (!(this+coverage).collect_coverage (c->input))) return; |
94 | 0 | + hb_zip (this+coverage, substitute) |
95 | 0 | | hb_map (hb_second) |
96 | 0 | | hb_sink (c->output) |
97 | 0 | ; |
98 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::collect_glyphs(OT::hb_collect_glyphs_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::collect_glyphs(OT::hb_collect_glyphs_context_t*) const |
99 | | |
100 | 2.89k | const Coverage &get_coverage () const { return this+coverage; }OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::get_coverage() const Line | Count | Source | 100 | 2.89k | const Coverage &get_coverage () const { return this+coverage; } |
Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::get_coverage() const |
101 | | |
102 | | bool would_apply (hb_would_apply_context_t *c) const |
103 | 0 | { return c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED; }Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::would_apply(OT::hb_would_apply_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::would_apply(OT::hb_would_apply_context_t*) const |
104 | | |
105 | | unsigned |
106 | | get_glyph_alternates (hb_codepoint_t glyph_id, |
107 | | unsigned start_offset, |
108 | | unsigned *alternate_count /* IN/OUT. May be NULL. */, |
109 | | hb_codepoint_t *alternate_glyphs /* OUT. May be NULL. */) const |
110 | 0 | { |
111 | 0 | unsigned int index = (this+coverage).get_coverage (glyph_id); |
112 | 0 | if (likely (index == NOT_COVERED)) |
113 | 0 | return 0; /* Leave the count for the next subtable. */ |
114 | | |
115 | | /* The substitute is the only alternate; nothing is past it. */ |
116 | 0 | if (start_offset && alternate_count && alternate_glyphs) |
117 | 0 | *alternate_count = 0; |
118 | |
|
119 | 0 | if (alternate_count && *alternate_count && alternate_glyphs) |
120 | 0 | { |
121 | 0 | glyph_id = substitute[index]; |
122 | |
|
123 | 0 | *alternate_glyphs = glyph_id; |
124 | 0 | *alternate_count = 1; |
125 | 0 | } |
126 | |
|
127 | 0 | return 1; |
128 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::get_glyph_alternates(unsigned int, unsigned int, unsigned int*, unsigned int*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::get_glyph_alternates(unsigned int, unsigned int, unsigned int*, unsigned int*) const |
129 | | |
130 | | void |
131 | | collect_glyph_alternates (hb_map_t *alternate_count /* IN/OUT */, |
132 | | hb_map_t *alternate_glyphs /* IN/OUT */) const |
133 | 0 | { |
134 | 0 | + hb_zip (this+coverage, substitute) |
135 | 0 | | hb_apply ([&] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t> &p) -> void |
136 | 0 | { _hb_collect_glyph_alternates_add (p.first, p.second, |
137 | 0 | alternate_count, alternate_glyphs); }) Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::collect_glyph_alternates(hb_map_t*, hb_map_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}::operator()(hb_pair_t<unsigned int, unsigned int> const&) constUnexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::collect_glyph_alternates(hb_map_t*, hb_map_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}::operator()(hb_pair_t<unsigned int, unsigned int> const&) const |
138 | 0 | ; |
139 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::collect_glyph_alternates(hb_map_t*, hb_map_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::collect_glyph_alternates(hb_map_t*, hb_map_t*) const |
140 | | |
141 | | bool apply (hb_ot_apply_context_t *c) const |
142 | 3.72k | { |
143 | 3.72k | TRACE_APPLY (this); |
144 | 3.72k | unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint); |
145 | 3.72k | if (index == NOT_COVERED) return_trace (false); |
146 | | |
147 | 2.32k | if (unlikely (index >= substitute.len)) return_trace (false); |
148 | | |
149 | 2.32k | if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) |
150 | 0 | { |
151 | 0 | c->buffer->sync_so_far (); |
152 | 0 | c->buffer->message (c->font, |
153 | 0 | "replacing glyph at %u (single substitution)", |
154 | 0 | c->buffer->idx); |
155 | 0 | } |
156 | | |
157 | 2.32k | c->replace_glyph (substitute[index]); |
158 | | |
159 | 2.32k | if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) |
160 | 0 | { |
161 | 0 | c->buffer->message (c->font, |
162 | 0 | "replaced glyph at %u (single substitution)", |
163 | 0 | c->buffer->idx - 1u); |
164 | 0 | } |
165 | | |
166 | 2.32k | return_trace (true); |
167 | 2.32k | } OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::apply(OT::hb_ot_apply_context_t*) const Line | Count | Source | 142 | 3.72k | { | 143 | 3.72k | TRACE_APPLY (this); | 144 | 3.72k | unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint); | 145 | 3.72k | if (index == NOT_COVERED) return_trace (false); | 146 | | | 147 | 2.32k | if (unlikely (index >= substitute.len)) return_trace (false); | 148 | | | 149 | 2.32k | if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) | 150 | 0 | { | 151 | 0 | c->buffer->sync_so_far (); | 152 | 0 | c->buffer->message (c->font, | 153 | 0 | "replacing glyph at %u (single substitution)", | 154 | 0 | c->buffer->idx); | 155 | 0 | } | 156 | | | 157 | 2.32k | c->replace_glyph (substitute[index]); | 158 | | | 159 | 2.32k | if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) | 160 | 0 | { | 161 | 0 | c->buffer->message (c->font, | 162 | 0 | "replaced glyph at %u (single substitution)", | 163 | 0 | c->buffer->idx - 1u); | 164 | 0 | } | 165 | | | 166 | 2.32k | return_trace (true); | 167 | 2.32k | } |
Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::apply(OT::hb_ot_apply_context_t*) const |
168 | | |
169 | | template<typename Iterator, |
170 | | hb_requires (hb_is_sorted_source_of (Iterator, |
171 | | hb_codepoint_pair_t))> |
172 | | bool serialize (hb_serialize_context_t *c, |
173 | | Iterator it) |
174 | 0 | { |
175 | 0 | TRACE_SERIALIZE (this); |
176 | 0 | auto substitutes = |
177 | 0 | + it |
178 | 0 | | hb_map (hb_second) |
179 | 0 | ; |
180 | 0 | auto glyphs = |
181 | 0 | + it |
182 | 0 | | hb_map_retains_sorting (hb_first) |
183 | 0 | ; |
184 | 0 | if (unlikely (!c->extend_min (this))) return_trace (false); |
185 | 0 | if (unlikely (!substitute.serialize (c, substitutes))) return_trace (false); |
186 | 0 | if (unlikely (!coverage.serialize_serialize (c, glyphs))) return_trace (false); |
187 | 0 | return_trace (true); |
188 | 0 | } Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_10SmallTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_11MediumTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_10SmallTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_11MediumTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_10SmallTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_11MediumTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: _ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_zip_iter_tI17hb_sorted_array_tINS_11HBGlyphID16EE10hb_array_tIS8_EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_9hb_pair_tIjjEEE5valuesrSF_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tSF_ Unexecuted instantiation: _ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_zip_iter_tI17hb_sorted_array_tINS_11HBGlyphID16EE10hb_array_tIS8_EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_9hb_pair_tIjjEEE5valuesrSF_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tSF_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNS1_L19subset_single_substEP19hb_subset_context_tRKNS0_6Common8CoverageEjjEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_6LSI_0EEZNS1_L19subset_single_substESB_SF_jjEUl9hb_pair_tIjjEE_LSH_1ELSI_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SS_EE5valuesrSX_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSX_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_10SmallTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_10SmallTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS2_INS0_11MediumTypesEE6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SX_IjjEEE5valuesrS15_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout9GSUB_impl20SingleSubstFormat2_4INS0_11MediumTypesEE9serializeI13hb_map_iter_tI16hb_filter_iter_tIS7_I13hb_zip_iter_tINS0_6Common8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID24EEERK8hb_set_tRK3$_7LPv0EESJ_RK3$_6LSN_0EEZNKS4_6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EETnPNSt3__19enable_ifIXaasr15hb_is_source_ofIT_SV_IjjEEE5valuesrS13_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS13_ |
189 | | |
190 | | bool subset (hb_subset_context_t *c) const |
191 | 0 | { |
192 | 0 | TRACE_SUBSET (this); |
193 | 0 | const hb_set_t &glyphset = *c->plan->glyphset_gsub (); |
194 | 0 | const hb_map_t &glyph_map = *c->plan->glyph_map; |
195 | 0 |
|
196 | 0 | auto it = |
197 | 0 | + hb_zip (this+coverage, substitute) |
198 | 0 | | hb_filter (glyphset, hb_first) |
199 | 0 | | hb_filter (glyphset, hb_second) |
200 | 0 | | hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const typename Types::HBGlyphID &> p) -> hb_codepoint_pair_t |
201 | 0 | { return hb_pair (glyph_map[p.first], glyph_map[p.second]); }) |
202 | 0 | ; |
203 | 0 |
|
204 | 0 | bool ret = bool (it); |
205 | 0 | SingleSubst_serialize (c->serializer, it); |
206 | 0 | return_trace (ret); |
207 | 0 | } Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::SmallTypes>::subset(hb_subset_context_t*) const Unexecuted instantiation: OT::Layout::GSUB_impl::SingleSubstFormat2_4<OT::Layout::MediumTypes>::subset(hb_subset_context_t*) const |
208 | | }; |
209 | | |
210 | | } |
211 | | } |
212 | | } |
213 | | |
214 | | #endif /* OT_LAYOUT_GSUB_SINGLESUBSTFORMAT2_HH */ |