Coverage Report

Created: 2025-10-10 06:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/harfbuzz/src/OT/Layout/GPOS/PosLookup.hh
Line
Count
Source
1
#ifndef OT_LAYOUT_GPOS_POSLOOKUP_HH
2
#define OT_LAYOUT_GPOS_POSLOOKUP_HH
3
4
#include "PosLookupSubTable.hh"
5
#include "../../../hb-ot-layout-common.hh"
6
7
namespace OT {
8
namespace Layout {
9
namespace GPOS_impl {
10
11
struct PosLookup : Lookup
12
{
13
  using SubTable = PosLookupSubTable;
14
15
  const SubTable& get_subtable (unsigned int i) const
16
0
  { return Lookup::get_subtable<SubTable> (i); }
17
18
  bool is_reverse () const
19
0
  {
20
0
    return false;
21
0
  }
22
23
  bool apply (hb_ot_apply_context_t *c) const
24
0
  {
25
0
    TRACE_APPLY (this);
26
0
    return_trace (dispatch (c));
27
0
  }
28
29
  bool intersects (const hb_set_t *glyphs) const
30
0
  {
31
0
    hb_intersects_context_t c (glyphs);
32
0
    return dispatch (&c);
33
0
  }
34
35
  hb_collect_glyphs_context_t::return_t collect_glyphs (hb_collect_glyphs_context_t *c) const
36
0
  { return dispatch (c); }
37
38
  hb_closure_lookups_context_t::return_t closure_lookups (hb_closure_lookups_context_t *c, unsigned this_index) const
39
0
  {
40
0
    if (c->is_lookup_visited (this_index))
41
0
      return hb_closure_lookups_context_t::default_return_value ();
42
0
43
0
    c->set_lookup_visited (this_index);
44
0
    if (!intersects (c->glyphs))
45
0
    {
46
0
      c->set_lookup_inactive (this_index);
47
0
      return hb_closure_lookups_context_t::default_return_value ();
48
0
    }
49
0
50
0
    hb_closure_lookups_context_t::return_t ret = dispatch (c);
51
0
    return ret;
52
0
  }
53
54
  template <typename set_t>
55
  void collect_coverage (set_t *glyphs) const
56
  {
57
    hb_collect_coverage_context_t<set_t> c (glyphs);
58
    dispatch (&c);
59
  }
60
61
  template <typename context_t>
62
  static typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
63
64
  template <typename context_t, typename ...Ts>
65
  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
66
0
  { return Lookup::dispatch<SubTable> (c, std::forward<Ts> (ds)...); }
Unexecuted instantiation: OT::hb_ot_apply_context_t::return_t OT::Layout::GPOS_impl::PosLookup::dispatch<OT::hb_ot_apply_context_t>(OT::hb_ot_apply_context_t*) const
Unexecuted instantiation: OT::hb_intersects_context_t::return_t OT::Layout::GPOS_impl::PosLookup::dispatch<OT::hb_intersects_context_t>(OT::hb_intersects_context_t*) const
Unexecuted instantiation: OT::hb_collect_glyphs_context_t::return_t OT::Layout::GPOS_impl::PosLookup::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::PosLookup::dispatch<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::Layout::GPOS_impl::PosLookup::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::PosLookup::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::PosLookup::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
67
68
  bool subset (hb_subset_context_t *c) const
69
0
  { return Lookup::subset<SubTable> (c); }
70
71
  bool sanitize (hb_sanitize_context_t *c) const
72
0
  { return Lookup::sanitize<SubTable> (c); }
73
};
74
75
}
76
}
77
}
78
79
#endif  /* OT_LAYOUT_GPOS_POSLOOKUP_HH */