1
//! WOFF2 lookup tables.
2

            
3
use crate::tag::*;
4

            
5
// When table tags are encoded into a WOFF2 TableDirectoryEntry this table is used to provide a
6
// 5-bit encoding for common tables. The tables are in the order that they are encoded such that
7
// the value read from the file can be looked up in this array to get the corresponding tag. If the
8
// value is 0b11111 (63), which is not present in this table, then this is an indication that a
9
// 4-byte tag follows the tag in the data stream.
10
// https://www.w3.org/TR/WOFF2/#table_dir_format
11
pub static KNOWN_TABLE_TAGS: [u32; 63] = [
12
    CMAP, HEAD, HHEA, HMTX, MAXP, NAME, OS_2, POST, CVT, FPGM, GLYF, LOCA, PREP, CFF, VORG, EBDT,
13
    EBLC, GASP, HDMX, KERN, LTSH, PCLT, VDMX, VHEA, VMTX, BASE, GDEF, GPOS, GSUB, EBSC, JSTF, MATH,
14
    CBDT, CBLC, COLR, CPAL, SVG, SBIX, ACNT, AVAR, BDAT, BLOC, BSLN, CVAR, FDSC, FEAT, FMTX, FVAR,
15
    GVAR, HSTY, JUST, LCAR, MORT, MORX, OPBD, PROP, TRAK, ZAPF, SILF, GLAT, GLOC, FEAT2, SILL,
16
];
17

            
18
pub struct XYTriplet {
19
    pub x_is_negative: bool,
20
    pub y_is_negative: bool,
21
    pub byte_count: u8,
22
    pub x_bits: u8,
23
    pub y_bits: u8,
24
    pub delta_x: u16,
25
    pub delta_y: u16,
26
}
27

            
28
impl XYTriplet {
29
    pub fn dx(&self, data: u32) -> i16 {
30
        let mask = (1u32 << self.x_bits) - 1;
31
        let shift = (self.byte_count * 8) - self.x_bits;
32
        let dx = ((data >> shift) & mask) + u32::from(self.delta_x);
33

            
34
        if self.x_is_negative {
35
            -(dx as i16)
36
        } else {
37
            dx as i16
38
        }
39
    }
40

            
41
    pub fn dy(&self, data: u32) -> i16 {
42
        let mask = (1u32 << self.y_bits) - 1;
43
        let shift = (self.byte_count * 8) - self.x_bits - self.y_bits;
44
        let dy = ((data >> shift) & mask) + u32::from(self.delta_y);
45

            
46
        if self.y_is_negative {
47
            -(dy as i16)
48
        } else {
49
            dy as i16
50
        }
51
    }
52
}
53

            
54
// Lookup table for decoding transformed glyf table point coordinates
55
// https://www.w3.org/TR/WOFF2/#glyf_table_format
56
#[rustfmt::skip]
57
pub static COORD_LUT: [XYTriplet; 128] = [
58
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: true  },
59
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: false },
60
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 256,  x_is_negative: false, y_is_negative: true  },
61
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 256,  x_is_negative: false, y_is_negative: false },
62
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 512,  x_is_negative: false, y_is_negative: true  },
63
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 512,  x_is_negative: false, y_is_negative: false },
64
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 768,  x_is_negative: false, y_is_negative: true  },
65
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 768,  x_is_negative: false, y_is_negative: false },
66
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 1024, x_is_negative: false, y_is_negative: true  },
67
    XYTriplet { byte_count: 1, x_bits: 0,  y_bits: 8,  delta_x: 0,    delta_y: 1024, x_is_negative: false, y_is_negative: false },
68
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 0,    delta_y: 0,    x_is_negative: true,  y_is_negative: false },
69
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: false },
70
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 256,  delta_y: 0,    x_is_negative: true,  y_is_negative: false },
71
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 256,  delta_y: 0,    x_is_negative: false, y_is_negative: false },
72
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 512,  delta_y: 0,    x_is_negative: true,  y_is_negative: false },
73
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 512,  delta_y: 0,    x_is_negative: false, y_is_negative: false },
74
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 768,  delta_y: 0,    x_is_negative: true,  y_is_negative: false },
75
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 768,  delta_y: 0,    x_is_negative: false, y_is_negative: false },
76
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 1024, delta_y: 0,    x_is_negative: true,  y_is_negative: false },
77
    XYTriplet { byte_count: 1, x_bits: 8,  y_bits: 0,  delta_x: 1024, delta_y: 0,    x_is_negative: false, y_is_negative: false },
78
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
79
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 1,    x_is_negative: false, y_is_negative: true  },
80
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 1,    x_is_negative: true,  y_is_negative: false },
81
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 1,    x_is_negative: false, y_is_negative: false },
82
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 17,   x_is_negative: true,  y_is_negative: true  },
83
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 17,   x_is_negative: false, y_is_negative: true  },
84
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 17,   x_is_negative: true,  y_is_negative: false },
85
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 17,   x_is_negative: false, y_is_negative: false },
86
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 33,   x_is_negative: true,  y_is_negative: true  },
87
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 33,   x_is_negative: false, y_is_negative: true  },
88
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 33,   x_is_negative: true,  y_is_negative: false },
89
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 33,   x_is_negative: false, y_is_negative: false },
90
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 49,   x_is_negative: true,  y_is_negative: true  },
91
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 49,   x_is_negative: false, y_is_negative: true  },
92
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 49,   x_is_negative: true,  y_is_negative: false },
93
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 1,    delta_y: 49,   x_is_negative: false, y_is_negative: false },
94
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
95
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 1,    x_is_negative: false, y_is_negative: true  },
96
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 1,    x_is_negative: true,  y_is_negative: false },
97
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 1,    x_is_negative: false, y_is_negative: false },
98
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 17,   x_is_negative: true,  y_is_negative: true  },
99
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 17,   x_is_negative: false, y_is_negative: true  },
100
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 17,   x_is_negative: true,  y_is_negative: false },
101
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 17,   x_is_negative: false, y_is_negative: false },
102
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 33,   x_is_negative: true,  y_is_negative: true  },
103
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 33,   x_is_negative: false, y_is_negative: true  },
104
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 33,   x_is_negative: true,  y_is_negative: false },
105
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 33,   x_is_negative: false, y_is_negative: false },
106
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 49,   x_is_negative: true,  y_is_negative: true  },
107
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 49,   x_is_negative: false, y_is_negative: true  },
108
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 49,   x_is_negative: true,  y_is_negative: false },
109
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 17,   delta_y: 49,   x_is_negative: false, y_is_negative: false },
110
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
111
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 1,    x_is_negative: false, y_is_negative: true  },
112
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 1,    x_is_negative: true,  y_is_negative: false },
113
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 1,    x_is_negative: false, y_is_negative: false },
114
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 17,   x_is_negative: true,  y_is_negative: true  },
115
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 17,   x_is_negative: false, y_is_negative: true  },
116
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 17,   x_is_negative: true,  y_is_negative: false },
117
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 17,   x_is_negative: false, y_is_negative: false },
118
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 33,   x_is_negative: true,  y_is_negative: true  },
119
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 33,   x_is_negative: false, y_is_negative: true  },
120
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 33,   x_is_negative: true,  y_is_negative: false },
121
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 33,   x_is_negative: false, y_is_negative: false },
122
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 49,   x_is_negative: true,  y_is_negative: true  },
123
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 49,   x_is_negative: false, y_is_negative: true  },
124
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 49,   x_is_negative: true,  y_is_negative: false },
125
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 33,   delta_y: 49,   x_is_negative: false, y_is_negative: false },
126
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
127
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 1,    x_is_negative: false, y_is_negative: true  },
128
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 1,    x_is_negative: true,  y_is_negative: false },
129
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 1,    x_is_negative: false, y_is_negative: false },
130
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 17,   x_is_negative: true,  y_is_negative: true  },
131
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 17,   x_is_negative: false, y_is_negative: true  },
132
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 17,   x_is_negative: true,  y_is_negative: false },
133
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 17,   x_is_negative: false, y_is_negative: false },
134
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 33,   x_is_negative: true,  y_is_negative: true  },
135
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 33,   x_is_negative: false, y_is_negative: true  },
136
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 33,   x_is_negative: true,  y_is_negative: false },
137
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 33,   x_is_negative: false, y_is_negative: false },
138
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 49,   x_is_negative: true,  y_is_negative: true  },
139
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 49,   x_is_negative: false, y_is_negative: true  },
140
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 49,   x_is_negative: true,  y_is_negative: false },
141
    XYTriplet { byte_count: 1, x_bits: 4,  y_bits: 4,  delta_x: 49,   delta_y: 49,   x_is_negative: false, y_is_negative: false },
142
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
143
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 1,    x_is_negative: false, y_is_negative: true  },
144
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 1,    x_is_negative: true,  y_is_negative: false },
145
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 1,    x_is_negative: false, y_is_negative: false },
146
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 257,  x_is_negative: true,  y_is_negative: true  },
147
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 257,  x_is_negative: false, y_is_negative: true  },
148
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 257,  x_is_negative: true,  y_is_negative: false },
149
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 257,  x_is_negative: false, y_is_negative: false },
150
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 513,  x_is_negative: true,  y_is_negative: true  },
151
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 513,  x_is_negative: false, y_is_negative: true  },
152
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 513,  x_is_negative: true,  y_is_negative: false },
153
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 1,    delta_y: 513,  x_is_negative: false, y_is_negative: false },
154
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
155
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 1,    x_is_negative: false, y_is_negative: true  },
156
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 1,    x_is_negative: true,  y_is_negative: false },
157
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 1,    x_is_negative: false, y_is_negative: false },
158
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 257,  x_is_negative: true,  y_is_negative: true  },
159
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 257,  x_is_negative: false, y_is_negative: true  },
160
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 257,  x_is_negative: true,  y_is_negative: false },
161
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 257,  x_is_negative: false, y_is_negative: false },
162
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 513,  x_is_negative: true,  y_is_negative: true  },
163
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 513,  x_is_negative: false, y_is_negative: true  },
164
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 513,  x_is_negative: true,  y_is_negative: false },
165
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 257,  delta_y: 513,  x_is_negative: false, y_is_negative: false },
166
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 1,    x_is_negative: true,  y_is_negative: true  },
167
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 1,    x_is_negative: false, y_is_negative: true  },
168
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 1,    x_is_negative: true,  y_is_negative: false },
169
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 1,    x_is_negative: false, y_is_negative: false },
170
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 257,  x_is_negative: true,  y_is_negative: true  },
171
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 257,  x_is_negative: false, y_is_negative: true  },
172
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 257,  x_is_negative: true,  y_is_negative: false },
173
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 257,  x_is_negative: false, y_is_negative: false },
174
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 513,  x_is_negative: true,  y_is_negative: true  },
175
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 513,  x_is_negative: false, y_is_negative: true  },
176
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 513,  x_is_negative: true,  y_is_negative: false },
177
    XYTriplet { byte_count: 2, x_bits: 8,  y_bits: 8,  delta_x: 513,  delta_y: 513,  x_is_negative: false, y_is_negative: false },
178
    XYTriplet { byte_count: 3, x_bits: 12, y_bits: 12, delta_x: 0,    delta_y: 0,    x_is_negative: true,  y_is_negative: true  },
179
    XYTriplet { byte_count: 3, x_bits: 12, y_bits: 12, delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: true  },
180
    XYTriplet { byte_count: 3, x_bits: 12, y_bits: 12, delta_x: 0,    delta_y: 0,    x_is_negative: true,  y_is_negative: false },
181
    XYTriplet { byte_count: 3, x_bits: 12, y_bits: 12, delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: false },
182
    XYTriplet { byte_count: 4, x_bits: 16, y_bits: 16, delta_x: 0,    delta_y: 0,    x_is_negative: true,  y_is_negative: true  },
183
    XYTriplet { byte_count: 4, x_bits: 16, y_bits: 16, delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: true  },
184
    XYTriplet { byte_count: 4, x_bits: 16, y_bits: 16, delta_x: 0,    delta_y: 0,    x_is_negative: true,  y_is_negative: false },
185
    XYTriplet { byte_count: 4, x_bits: 16, y_bits: 16, delta_x: 0,    delta_y: 0,    x_is_negative: false, y_is_negative: false },
186
];