Coverage Report

Created: 2025-08-29 06:20

/src/harfbuzz/src/OT/Layout/GSUB/MultipleSubst.hh
Line
Count
Source (jump to first uncovered line)
1
#ifndef OT_LAYOUT_GSUB_MULTIPLESUBST_HH
2
#define OT_LAYOUT_GSUB_MULTIPLESUBST_HH
3
4
#include "Common.hh"
5
#include "MultipleSubstFormat1.hh"
6
7
namespace OT {
8
namespace Layout {
9
namespace GSUB_impl {
10
11
struct MultipleSubst
12
{
13
  protected:
14
  union {
15
  HBUINT16        format;         /* Format identifier */
16
  MultipleSubstFormat1_2<SmallTypes>  format1;
17
#ifndef HB_NO_BEYOND_64K
18
  MultipleSubstFormat1_2<MediumTypes> format2;
19
#endif
20
  } u;
21
22
  public:
23
24
  template <typename context_t, typename ...Ts>
25
  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
26
0
  {
27
0
    if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value ();
28
0
    TRACE_DISPATCH (this, u.format);
29
0
    switch (u.format) {
30
0
    case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
31
#ifndef HB_NO_BEYOND_64K
32
    case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
33
#endif
34
0
    default:return_trace (c->default_return_value ());
35
0
    }
36
0
  }
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: hb_sanitize_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<hb_sanitize_context_t>(hb_sanitize_context_t*) const
Unexecuted instantiation: OT::hb_have_non_1to1_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<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::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_ot_apply_context_t>(OT::hb_ot_apply_context_t*) const
Unexecuted instantiation: OT::hb_closure_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_closure_context_t>(OT::hb_closure_context_t*) const
Unexecuted instantiation: OT::hb_closure_lookups_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_closure_lookups_context_t>(OT::hb_closure_lookups_context_t*) const
Unexecuted instantiation: OT::hb_collect_glyphs_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*) const
Unexecuted instantiation: OT::hb_would_apply_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_would_apply_context_t>(OT::hb_would_apply_context_t*) const
Unexecuted instantiation: hb_subset_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<hb_subset_context_t>(hb_subset_context_t*) const
Unexecuted instantiation: OT::hb_accelerate_subtables_context_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<OT::hb_accelerate_subtables_context_t>(OT::hb_accelerate_subtables_context_t*) const
Unexecuted instantiation: hb_get_glyph_alternates_dispatch_t::return_t OT::Layout::GSUB_impl::MultipleSubst::dispatch<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
37
38
  template<typename Iterator,
39
           hb_requires (hb_is_sorted_iterator (Iterator))>
40
  bool serialize (hb_serialize_context_t *c,
41
      Iterator it)
42
  {
43
    TRACE_SERIALIZE (this);
44
    if (unlikely (!c->extend_min (u.format))) return_trace (false);
45
    unsigned int format = 1;
46
    u.format = format;
47
    switch (u.format) {
48
    case 1: return_trace (u.format1.serialize (c, it));
49
    default:return_trace (false);
50
    }
51
  }
52
53
  /* TODO subset() should choose format. */
54
55
};
56
57
58
}
59
}
60
}
61
62
#endif /* OT_LAYOUT_GSUB_MULTIPLESUBST_HH */