comparison mupdf-source/thirdparty/harfbuzz/src/OT/Layout/GPOS/PairPos.hh @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #ifndef OT_LAYOUT_GPOS_PAIRPOS_HH
2 #define OT_LAYOUT_GPOS_PAIRPOS_HH
3
4 #include "PairPosFormat1.hh"
5 #include "PairPosFormat2.hh"
6
7 namespace OT {
8 namespace Layout {
9 namespace GPOS_impl {
10
11 struct PairPos
12 {
13 protected:
14 union {
15 HBUINT16 format; /* Format identifier */
16 PairPosFormat1_3<SmallTypes> format1;
17 PairPosFormat2_4<SmallTypes> format2;
18 #ifndef HB_NO_BEYOND_64K
19 PairPosFormat1_3<MediumTypes> format3;
20 PairPosFormat2_4<MediumTypes> format4;
21 #endif
22 } u;
23
24 public:
25 template <typename context_t, typename ...Ts>
26 typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
27 {
28 TRACE_DISPATCH (this, u.format);
29 if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
30 switch (u.format) {
31 case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
32 case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
33 #ifndef HB_NO_BEYOND_64K
34 case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
35 case 4: return_trace (c->dispatch (u.format4, std::forward<Ts> (ds)...));
36 #endif
37 default:return_trace (c->default_return_value ());
38 }
39 }
40 };
41
42 }
43 }
44 }
45
46 #endif // OT_LAYOUT_GPOS_PAIRPOS_HH