Imported Upstream version 2.6.7
[platform/upstream/harfbuzz.git] / src / hb-unicode-emoji-table.hh
1 /* == Start of generated table == */
2 /*
3  * The following tables are generated by running:
4  *
5  *   ./gen-emoji-table.py emoji-data.txt
6  *
7  * on file with this header:
8  *
9  * # emoji-data.txt
10  * # Date: 2020-01-28, 20:52:38 GMT
11  * # © 2020 Unicode®, Inc.
12  * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
13  * # For terms of use, see http://www.unicode.org/terms_of_use.html
14  * #
15  * # Emoji Data for UTS #51
16  * # Version: 13.0
17  * #
18  * # For documentation and usage, see http://www.unicode.org/reports/tr51
19  */
20
21 #ifndef HB_UNICODE_EMOJI_TABLE_HH
22 #define HB_UNICODE_EMOJI_TABLE_HH
23
24 #include "hb-unicode.hh"
25
26 static const uint8_t
27 _hb_emoji_u8[448] =
28 {
29     0,  0,  0,  0, 33,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
30     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
31     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
32     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 84,118,
33     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
34     0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  2,  0,  0,  3,
35     0,  0,  0,  0,  0,  0,  4,  5,  6,  7,  8,  7,  9, 10, 11,  0,
36     0,  0,  0,  0, 12,  0,  0,  0,  0,  0,  0,  0, 13,  0,  0,  0,
37     7,  7,  7, 14, 15, 16, 17, 18, 19, 20,  7,  7,  7,  7,  7, 21,
38     7,  7,  7,  7, 22, 23,  7,  7,  7, 24,  7, 14,  0, 25,  0, 26,
39    27, 28, 29, 14, 30, 31,  7,  7,  7,  7,  7, 14,  0,  0,  0,  0,
40     7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7, 22,
41     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,240,  1,  0,  2,  0,  0,
42     0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,254,  7,  3,
43     0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0, 56,
44   159,255,243,255,255,255,255,255,255,255,255,255,255,255,255,255,
45    31,  0,255,255,255,255,255,255, 31,255,  3,  0,  0,  0,  8,  0,
46     0,  0, 24,  0,120,  0,  0,  0,  0,  0, 96,  0,  0,  0,  0,  0,
47     0,  0,  0,  0,  0,  0, 16,  0, 96,  0,  0,  8,  0,  0,  0,  0,
48   255,255,255,255,255,255,255,127,  0, 96,  0,  0,  0,  0,  0,  0,
49     0,  0,  0,  0,  0,240,  1, 64,  0,  0,254,  3,  0,224,255,255,
50   255,255,255,255, 31,  0,  0,  0,254,127,  0,  0,  0,  0,252,115,
51     0,254,255,255,255,255,255,255,255,255,255,255,255,255,255,  3,
52   255,255,255,255,255,255,255, 31,192,255,255,255,255,255,255,255,
53   255,127,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,240,127,
54     0,  0,224,255,255,255,255,127,  0,112,  0,  0,  0,  0,  0,  0,
55     0,127,  0,124,  0,  0,  0,  0,  0,127,  0,  0,  0,192,255,255,
56     0,240,255,255,255,255,255,243,159,255,255,255,255,255,255,255,
57 };
58
59 static inline unsigned
60 _hb_emoji_b4 (const uint8_t* a, unsigned i)
61 {
62   return (a[i>>1]>>((i&1u)<<2))&15u;
63 }
64 static inline unsigned
65 _hb_emoji_b1 (const uint8_t* a, unsigned i)
66 {
67   return (a[i>>3]>>((i&7u)<<0))&1u;
68 }
69 static inline uint_fast8_t
70 _hb_emoji_is_Extended_Pictographic (unsigned u)
71 {
72   return u<131069u?_hb_emoji_b1(192+_hb_emoji_u8,((_hb_emoji_u8[64+(((_hb_emoji_b4(_hb_emoji_u8,u>>6>>4))<<4)+((u>>6)&15u))])<<6)+((u)&63u)):0;
73 }
74
75
76 #endif /* HB_UNICODE_EMOJI_TABLE_HH */
77
78 /* == End of generated table == */