Line | Count | Source |
1 | #ifndef OT_LAYOUT_GPOS_SINGLEPOS_HH | |
2 | #define OT_LAYOUT_GPOS_SINGLEPOS_HH | |
3 | ||
4 | #include "SinglePosFormat1.hh" | |
5 | #include "SinglePosFormat2.hh" | |
6 | ||
7 | namespace OT { | |
8 | namespace Layout { | |
9 | namespace GPOS_impl { | |
10 | ||
11 | struct SinglePos | |
12 | { | |
13 | protected: | |
14 | union { | |
15 | struct { HBUINT16 v; } format; /* Format identifier */ | |
16 | SinglePosFormat1 format1; | |
17 | SinglePosFormat2 format2; | |
18 | } u; | |
19 | ||
20 | public: | |
21 | template<typename Iterator, | |
22 | hb_requires (hb_is_iterator (Iterator))> | |
23 | unsigned get_format (Iterator glyph_val_iter_pairs) | |
24 | 0 | { |
25 | 0 | hb_array_t<const Value> first_val_iter = hb_second (*glyph_val_iter_pairs); |
26 | 0 | |
27 | 0 | for (const auto iter : glyph_val_iter_pairs) |
28 | 0 | for (const auto _ : hb_zip (iter.second, first_val_iter)) |
29 | 0 | if (_.first != _.second) |
30 | 0 | return 2; |
31 | 0 | |
32 | 0 | return 1; |
33 | 0 | }Unexecuted instantiation: _ZN2OT6Layout9GPOS_impl9SinglePos10get_formatI13hb_zip_iter_tI13hb_map_iter_tIN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSN_6item_tEEE5valueEvE4typeELSC_0EEEjSN_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GPOS_impl9SinglePos10get_formatI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEjSW_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GPOS_impl9SinglePos10get_formatI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEjSW_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GPOS_impl9SinglePos10get_formatI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEjSW_ Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout9GPOS_impl9SinglePos10get_formatI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEjSW_ |
34 | ||
35 | template<typename Iterator, | |
36 | typename SrcLookup, | |
37 | hb_requires (hb_is_iterator (Iterator))> | |
38 | void serialize (hb_serialize_context_t *c, | |
39 | const SrcLookup* src, | |
40 | Iterator glyph_val_iter_pairs, | |
41 | const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map, | |
42 | unsigned newFormat) | |
43 | 0 | { |
44 | 0 | if (unlikely (!c->extend_min (u.format.v))) return; |
45 | 0 | unsigned format = 2; |
46 | 0 | ValueFormat new_format; |
47 | 0 | new_format = newFormat; |
48 | 0 | |
49 | 0 | if (glyph_val_iter_pairs) |
50 | 0 | format = get_format (glyph_val_iter_pairs); |
51 | 0 | |
52 | 0 | u.format.v = format; |
53 | 0 | switch (u.format.v) { |
54 | 0 | case 1: u.format1.serialize (c, |
55 | 0 | src, |
56 | 0 | glyph_val_iter_pairs, |
57 | 0 | new_format, |
58 | 0 | layout_variation_idx_delta_map); |
59 | 0 | return; |
60 | 0 | case 2: u.format2.serialize (c, |
61 | 0 | src, |
62 | 0 | glyph_val_iter_pairs, |
63 | 0 | new_format, |
64 | 0 | layout_variation_idx_delta_map); |
65 | 0 | return; |
66 | 0 | default:return; |
67 | 0 | } |
68 | 0 | }Unexecuted instantiation: _ZN2OT6Layout9GPOS_impl9SinglePos9serializeI13hb_zip_iter_tI13hb_map_iter_tIN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEENS1_16SinglePosFormat1ETnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSO_6item_tEEE5valueEvE4typeELSC_0EEEvP22hb_serialize_context_tPKT0_SO_PK12hb_hashmap_tIj9hb_pair_tIjiELb0EEj Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout9GPOS_impl9SinglePos9serializeI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EESL_TnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEvP22hb_serialize_context_tPKT0_SW_PK12hb_hashmap_tIjSO_IjiELb0EEj Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout9GPOS_impl9SinglePos9serializeI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EESL_TnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEvP22hb_serialize_context_tPKT0_SW_PK12hb_hashmap_tIjSO_IjiELb0EEj Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout9GPOS_impl9SinglePos9serializeI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EESL_TnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEvP22hb_serialize_context_tPKT0_SW_PK12hb_hashmap_tIjSO_IjiELb0EEj Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout9GPOS_impl9SinglePos9serializeI13hb_map_iter_tI16hb_filter_iter_tI13hb_zip_iter_tINS0_6Common8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS1_16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSJ_0EESL_TnPN12hb_enable_ifIXsr17hb_is_iterator_ofIT_NSW_6item_tEEE5valueEvE4typeELSJ_0EEEvP22hb_serialize_context_tPKT0_SW_PK12hb_hashmap_tIjSO_IjiELb0EEj |
69 | ||
70 | template <typename context_t, typename ...Ts> | |
71 | typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const | |
72 | 0 | { |
73 | 0 | if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); |
74 | 0 | TRACE_DISPATCH (this, u.format.v); |
75 | 0 | switch (u.format.v) { |
76 | 0 | case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); |
77 | 0 | case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); |
78 | 0 | default:return_trace (c->default_return_value ()); |
79 | 0 | } |
80 | 0 | }Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const Unexecuted instantiation: OT::hb_ot_apply_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<OT::hb_ot_apply_context_t>(OT::hb_ot_apply_context_t*) const Unexecuted instantiation: OT::hb_collect_glyphs_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const Unexecuted instantiation: hb_subset_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<hb_subset_context_t>(hb_subset_context_t*) const Unexecuted instantiation: hb_sanitize_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<hb_sanitize_context_t>(hb_sanitize_context_t*) const Unexecuted instantiation: OT::hb_collect_variation_indices_context_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<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::Layout::GPOS_impl::SinglePos::dispatch<OT::hb_accelerate_subtables_context_t>(OT::hb_accelerate_subtables_context_t*) const Unexecuted instantiation: hb_position_single_dispatch_t::return_t OT::Layout::GPOS_impl::SinglePos::dispatch<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 |
81 | }; | |
82 | ||
83 | ||
84 | template<typename Iterator, typename SrcLookup> | |
85 | static void | |
86 | SinglePos_serialize (hb_serialize_context_t *c, | |
87 | const SrcLookup *src, | |
88 | Iterator it, | |
89 | const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map, | |
90 | unsigned new_format) | |
91 | 0 | { c->start_embed<SinglePos> ()->serialize (c, src, it, layout_variation_idx_delta_map, new_format); }Unexecuted instantiation: hb-ot-face.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, OT::Layout::GPOS_impl::SinglePosFormat1>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat1 const*, hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int) Unexecuted instantiation: hb-ot-face.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat2 const*, hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int)Unexecuted instantiation: hb-aat-layout.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, OT::Layout::GPOS_impl::SinglePosFormat1>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat1 const*, hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int) Unexecuted instantiation: hb-aat-layout.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat2 const*, hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int)Unexecuted instantiation: hb-ot-layout.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, OT::Layout::GPOS_impl::SinglePosFormat1>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat1 const*, hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int) Unexecuted instantiation: hb-ot-layout.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat2 const*, hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int)Unexecuted instantiation: hb-ot-shape-fallback.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, OT::Layout::GPOS_impl::SinglePosFormat1>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat1 const*, hb_zip_iter_t<hb_map_iter_t<hb_bit_set_invertible_t::iter_t, hb_map_t const&, (hb_function_sortedness_t)1, (void*)0>, hb_repeat_iter_t<hb_array_t<OT::NumType<true, unsigned short, 2u> const> > >, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int) Unexecuted instantiation: hb-ot-shape-fallback.cc:void OT::Layout::GPOS_impl::SinglePos_serialize<hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2>(hb_serialize_context_t*, OT::Layout::GPOS_impl::SinglePosFormat2 const*, hb_map_iter_t<hb_filter_iter_t<hb_zip_iter_t<OT::Layout::Common::Coverage::iter_t, hb_range_iter_t<unsigned int, unsigned int> >, hb_set_t const&, $_6 const&, (void*)0>, OT::Layout::GPOS_impl::SinglePosFormat2::subset(hb_subset_context_t*) const::{lambda(hb_pair_t<unsigned int, unsigned int> const&)#1}, (hb_function_sortedness_t)1, (void*)0>, hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false> const*, unsigned int) |
92 | ||
93 | ||
94 | } | |
95 | } | |
96 | } | |
97 | ||
98 | #endif /* OT_LAYOUT_GPOS_SINGLEPOS_HH */ |