1 | #ifndef OT_LAYOUT_GSUB_GSUB_HH |
---|---|
2 | #define OT_LAYOUT_GSUB_GSUB_HH |
3 | |
4 | #include "../../../hb-ot-layout-gsubgpos.hh" |
5 | #include "Common.hh" |
6 | #include "SubstLookup.hh" |
7 | |
8 | namespace OT { |
9 | |
10 | using Layout::GSUB_impl::SubstLookup; |
11 | |
12 | namespace Layout { |
13 | |
14 | /* |
15 | * GSUB -- Glyph Substitution |
16 | * https://docs.microsoft.com/en-us/typography/opentype/spec/gsub |
17 | */ |
18 | |
19 | struct GSUB : GSUBGPOS |
20 | { |
21 | using Lookup = SubstLookup; |
22 | |
23 | static constexpr hb_tag_t tableTag = HB_OT_TAG_GSUB; |
24 | |
25 | const SubstLookup& get_lookup (unsigned int i) const |
26 | { return static_cast<const SubstLookup &> (GSUBGPOS::get_lookup (i)); } |
27 | |
28 | bool subset (hb_subset_context_t *c) const |
29 | { |
30 | hb_subset_layout_context_t l (c, tableTag); |
31 | return GSUBGPOS::subset<SubstLookup> (&l); |
32 | } |
33 | |
34 | bool sanitize (hb_sanitize_context_t *c) const |
35 | { |
36 | TRACE_SANITIZE (this); |
37 | return_trace (GSUBGPOS::sanitize<SubstLookup> (c)); |
38 | } |
39 | |
40 | HB_INTERNAL bool is_blocklisted (hb_blob_t *blob, |
41 | hb_face_t *face) const; |
42 | |
43 | void closure_lookups (hb_face_t *face, |
44 | const hb_set_t *glyphs, |
45 | hb_set_t *lookup_indexes /* IN/OUT */) const |
46 | { GSUBGPOS::closure_lookups<SubstLookup> (face, glyphs, lookup_indexes); } |
47 | |
48 | typedef GSUBGPOS::accelerator_t<GSUB> accelerator_t; |
49 | }; |
50 | |
51 | |
52 | } |
53 | |
54 | struct GSUB_accelerator_t : Layout::GSUB::accelerator_t { |
55 | GSUB_accelerator_t (hb_face_t *face) : Layout::GSUB::accelerator_t (face) {} |
56 | }; |
57 | |
58 | |
59 | } |
60 | |
61 | #endif /* OT_LAYOUT_GSUB_GSUB_HH */ |
62 |