blob: 9bcbf1cbc9beaaaa332d5362f4d721af8ae2fd99 [file] [log] [blame]
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -05001/*
Behdad Esfahbod2409d5f2011-04-21 17:14:28 -04002 * Copyright © 2007,2008,2009 Red Hat, Inc.
Behdad Esfahbod46952462013-10-17 21:01:57 +02003 * Copyright © 2012,2013 Google, Inc.
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -05004 *
Behdad Esfahbodc755cb32010-04-22 00:11:43 -04005 * This is part of HarfBuzz, a text shaping library.
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -05006 *
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
12 *
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17 * DAMAGE.
18 *
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 *
25 * Red Hat Author(s): Behdad Esfahbod
Behdad Esfahbodf8603662012-07-30 02:38:39 -040026 * Google Author(s): Behdad Esfahbod
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -050027 */
28
Behdad Esfahbod0f0cd9d2010-06-09 06:32:56 -040029#ifndef HB_OT_LAYOUT_PRIVATE_HH
30#define HB_OT_LAYOUT_PRIVATE_HH
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -050031
Behdad Esfahbodc57d4542011-04-20 18:50:27 -040032#include "hb-private.hh"
Behdad Esfahbod2c802962009-08-02 15:20:22 -040033
Behdad Esfahbodc57d4542011-04-20 18:50:27 -040034#include "hb-font-private.hh"
Behdad Esfahbod22da7fd2010-05-12 18:23:21 -040035#include "hb-buffer-private.hh"
Behdad Esfahbod826a1da2017-10-15 14:09:05 +020036#include "hb-set-digest-private.hh"
Behdad Esfahbod1f810da2017-01-09 23:50:56 -080037#include "hb-open-type-private.hh"
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -050038
Behdad Esfahbod23c86aa2009-08-03 21:40:20 -040039
Behdad Esfahbod0f98fe82015-07-23 11:52:11 +010040/* Private API corresponding to hb-ot-layout.h: */
41
42HB_INTERNAL hb_bool_t
43hb_ot_layout_table_find_feature (hb_face_t *face,
44 hb_tag_t table_tag,
45 hb_tag_t feature_tag,
46 unsigned int *feature_index);
47
48
Behdad Esfahbod266b3442011-05-03 00:35:53 -040049/*
50 * GDEF
51 */
52
Behdad Esfahbodaa7044d2015-11-04 16:25:57 -080053enum hb_ot_layout_glyph_props_flags_t
Behdad Esfahbod05ad6b52013-10-18 00:45:59 +020054{
Behdad Esfahbod03058c32013-10-17 20:55:34 +020055 /* The following three match LookupFlags::Ignore* numbers. */
Behdad Esfahbod941b6992013-10-17 20:47:33 +020056 HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH = 0x02u,
57 HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE = 0x04u,
Behdad Esfahbod05ad6b52013-10-18 00:45:59 +020058 HB_OT_LAYOUT_GLYPH_PROPS_MARK = 0x08u,
59
60 /* The following are used internally; not derived from GDEF. */
Behdad Esfahbod09675a82013-10-18 01:05:58 +020061 HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED = 0x10u,
62 HB_OT_LAYOUT_GLYPH_PROPS_LIGATED = 0x20u,
Behdad Esfahbod832a6f92014-06-04 16:57:42 -040063 HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED = 0x40u,
Behdad Esfahbod03058c32013-10-17 20:55:34 +020064
Behdad Esfahbod09675a82013-10-18 01:05:58 +020065 HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE = HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED |
Behdad Esfahbod832a6f92014-06-04 16:57:42 -040066 HB_OT_LAYOUT_GLYPH_PROPS_LIGATED |
67 HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED
Behdad Esfahbodaa7044d2015-11-04 16:25:57 -080068};
Chun-wei Fan167c3272015-11-09 17:17:56 +080069HB_MARK_AS_FLAG_T (hb_ot_layout_glyph_props_flags_t);
Behdad Esfahbod5a08ecf2012-11-16 13:34:29 -080070
Behdad Esfahbodead428d2008-01-24 03:54:09 -050071
Behdad Esfahbod49c5ec52012-07-23 20:14:13 -040072/*
73 * GSUB/GPOS
74 */
75
Behdad Esfahbodf8603662012-07-30 02:38:39 -040076HB_INTERNAL hb_bool_t
Behdad Esfahbod362a9902012-11-15 14:57:31 -080077hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
Behdad Esfahbodd9b204d2012-08-23 16:22:28 -040078 unsigned int lookup_index,
Behdad Esfahbodf8603662012-07-30 02:38:39 -040079 const hb_codepoint_t *glyphs,
80 unsigned int glyphs_length,
Behdad Esfahbodd9b204d2012-08-23 16:22:28 -040081 hb_bool_t zero_context);
Behdad Esfahbodf8603662012-07-30 02:38:39 -040082
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -040083
84/* Should be called before all the substitute_lookup's are done. */
85HB_INTERNAL void
Behdad Esfahbodafbcc242012-08-02 08:36:40 -040086hb_ot_layout_substitute_start (hb_font_t *font,
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -040087 hb_buffer_t *buffer);
Behdad Esfahbodf8603662012-07-30 02:38:39 -040088
Behdad Esfahbodbac1dd62013-05-02 18:52:24 -040089
90struct hb_ot_layout_lookup_accelerator_t;
91
92namespace OT {
Behdad Esfahbodfd034492018-01-17 16:46:51 -080093 struct hb_ot_apply_context_t;
Behdad Esfahbodbac1dd62013-05-02 18:52:24 -040094 struct SubstLookup;
95}
96
97HB_INTERNAL void
Behdad Esfahbodfd034492018-01-17 16:46:51 -080098hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
Behdad Esfahbodbac1dd62013-05-02 18:52:24 -040099 const OT::SubstLookup &lookup,
100 const hb_ot_layout_lookup_accelerator_t &accel);
101
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -0400102
Behdad Esfahbod7d8d58a2016-02-11 16:34:28 +0700103/* Should be called before all the position_lookup's are done. */
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -0400104HB_INTERNAL void
105hb_ot_layout_position_start (hb_font_t *font,
106 hb_buffer_t *buffer);
107
Behdad Esfahbod7d8d58a2016-02-11 16:34:28 +0700108/* Should be called after all the position_lookup's are done, to finish advances. */
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -0400109HB_INTERNAL void
Behdad Esfahbod7d8d58a2016-02-11 16:34:28 +0700110hb_ot_layout_position_finish_advances (hb_font_t *font,
111 hb_buffer_t *buffer);
112
113/* Should be called after hb_ot_layout_position_finish_advances, to finish offsets. */
114HB_INTERNAL void
115hb_ot_layout_position_finish_offsets (hb_font_t *font,
116 hb_buffer_t *buffer);
Behdad Esfahbodb0e6a262012-08-02 08:11:14 -0400117
Behdad Esfahbodf8603662012-07-30 02:38:39 -0400118
119
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400120/*
121 * hb_ot_layout_t
122 */
123
Behdad Esfahbod7c8e8442012-08-28 17:57:49 -0400124namespace OT {
Elie Rouxf748e112017-02-18 19:54:33 +0100125 struct BASE;
Ebrahim Byagowif671f7f2018-02-28 13:19:40 +0330126 struct COLR;
127 struct CPAL;
Behdad Esfahbod7c8e8442012-08-28 17:57:49 -0400128 struct GDEF;
129 struct GSUB;
130 struct GPOS;
Frédéric Wang5fbcb992016-08-25 10:47:15 +0200131 struct MATH;
Behdad Esfahbod55d42fd2017-01-19 19:35:48 -0800132 struct fvar;
133 struct avar;
Behdad Esfahbod7c8e8442012-08-28 17:57:49 -0400134}
135
Behdad Esfahbodc71b55a2017-08-14 17:24:36 -0700136namespace AAT {
Ebrahim Byagowiae14dd02018-02-26 00:31:09 +0330137 struct ankr;
Ebrahim Byagowia64eacd2018-02-19 23:27:08 +0330138 struct kerx;
Ebrahim Byagowiae14dd02018-02-26 00:31:09 +0330139 struct morx;
Ebrahim Byagowia64eacd2018-02-19 23:27:08 +0330140 struct trak;
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400141}
142
Behdad Esfahbod45fd9422013-05-02 18:06:51 -0400143struct hb_ot_layout_lookup_accelerator_t
144{
145 template <typename TLookup>
146 inline void init (const TLookup &lookup)
147 {
148 digest.init ();
149 lookup.add_coverage (&digest);
150 }
151
Behdad Esfahbod395b3592014-12-28 16:03:26 -0800152 inline void fini (void)
Behdad Esfahbod45fd9422013-05-02 18:06:51 -0400153 {
154 }
155
Behdad Esfahbod241eac92015-01-28 20:55:42 -0800156 inline bool may_have (hb_codepoint_t g) const {
157 return digest.may_have (g);
158 }
159
160 private:
Behdad Esfahbod45fd9422013-05-02 18:06:51 -0400161 hb_set_digest_t digest;
162};
163
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400164struct hb_ot_layout_t
165{
166 hb_blob_t *gdef_blob;
167 hb_blob_t *gsub_blob;
168 hb_blob_t *gpos_blob;
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400169
Behdad Esfahbod7c8e8442012-08-28 17:57:49 -0400170 const struct OT::GDEF *gdef;
171 const struct OT::GSUB *gsub;
172 const struct OT::GPOS *gpos;
Behdad Esfahbod1336ecd2012-08-01 21:46:36 -0400173
Behdad Esfahbod55d42fd2017-01-19 19:35:48 -0800174 /* TODO Move the following out of this struct. */
Elie Rouxf748e112017-02-18 19:54:33 +0100175 OT::hb_lazy_table_loader_t<struct OT::BASE> base;
Ebrahim Byagowif671f7f2018-02-28 13:19:40 +0330176 OT::hb_lazy_table_loader_t<struct OT::COLR> colr;
Ebrahim Byagowi5b9c2342018-02-27 22:56:17 +0330177 OT::hb_lazy_table_loader_t<struct OT::CPAL> cpal;
Ebrahim Byagowif671f7f2018-02-28 13:19:40 +0330178 OT::hb_lazy_table_loader_t<struct OT::MATH> math;
Behdad Esfahbod55d42fd2017-01-19 19:35:48 -0800179 OT::hb_lazy_table_loader_t<struct OT::fvar> fvar;
180 OT::hb_lazy_table_loader_t<struct OT::avar> avar;
Ebrahim Byagowiae14dd02018-02-26 00:31:09 +0330181 OT::hb_lazy_table_loader_t<struct AAT::ankr> ankr;
Ebrahim Byagowia64eacd2018-02-19 23:27:08 +0330182 OT::hb_lazy_table_loader_t<struct AAT::kerx> kerx;
Ebrahim Byagowiae14dd02018-02-26 00:31:09 +0330183 OT::hb_lazy_table_loader_t<struct AAT::morx> morx;
Ebrahim Byagowia64eacd2018-02-19 23:27:08 +0330184 OT::hb_lazy_table_loader_t<struct AAT::trak> trak;
Behdad Esfahbod1336ecd2012-08-01 21:46:36 -0400185
Behdad Esfahbod6f761132012-08-02 04:00:31 -0400186 unsigned int gsub_lookup_count;
187 unsigned int gpos_lookup_count;
188
Behdad Esfahbod45fd9422013-05-02 18:06:51 -0400189 hb_ot_layout_lookup_accelerator_t *gsub_accels;
190 hb_ot_layout_lookup_accelerator_t *gpos_accels;
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400191};
192
Behdad Esfahbod266b3442011-05-03 00:35:53 -0400193
194HB_INTERNAL hb_ot_layout_t *
195_hb_ot_layout_create (hb_face_t *face);
196
197HB_INTERNAL void
198_hb_ot_layout_destroy (hb_ot_layout_t *layout);
199
200
Behdad Esfahbod46952462013-10-17 21:01:57 +0200201#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
202
Behdad Esfahbodfd92a3d2008-01-24 03:11:09 -0500203
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200204/*
205 * Buffer var routines.
206 */
207
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200208/* buffer var allocations, used during the entire shaping process */
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800209#define unicode_props() var2.u16[0]
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200210
211/* buffer var allocations, used during the GSUB/GPOS processing */
212#define glyph_props() var1.u16[0] /* GDEF glyph properties */
213#define lig_props() var1.u8[2] /* GSUB/GPOS ligature tracking */
214#define syllable() var1.u8[3] /* GSUB/GPOS shaping boundaries */
215
Behdad Esfahbodac596512015-07-22 11:54:02 +0100216
Behdad Esfahbod1c17c2b2017-08-11 19:06:07 -0700217/* Loop over syllables. Based on foreach_cluster(). */
Behdad Esfahbodac596512015-07-22 11:54:02 +0100218#define foreach_syllable(buffer, start, end) \
219 for (unsigned int \
220 _count = buffer->len, \
221 start = 0, end = _count ? _next_syllable (buffer, 0) : 0; \
222 start < _count; \
223 start = end, end = _next_syllable (buffer, start))
224
225static inline unsigned int
226_next_syllable (hb_buffer_t *buffer, unsigned int start)
227{
228 hb_glyph_info_t *info = buffer->info;
229 unsigned int count = buffer->len;
230
231 unsigned int syllable = info[start].syllable();
232 while (++start < count && syllable == info[start].syllable())
233 ;
234
235 return start;
236}
237
238
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200239/* unicode_props */
240
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800241/* Design:
242 * unicode_props() is a two-byte number. The low byte includes:
243 * - General_Category: 5 bits.
244 * - A bit each for:
245 * * Is it Default_Ignorable(); we have a modified Default_Ignorable().
Behdad Esfahbod81e2b9b2017-10-15 10:48:19 +0200246 * * Whether it's one of the three Mongolian Free Variation Selectors,
247 * CGJ, or other characters that are hidden but should not be ignored
248 * like most other Default_Ignorable()s do during matching.
Behdad Esfahbodb2030502016-04-26 16:41:17 -0700249 * * One free bit right now.
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800250 *
251 * The high-byte has different meanings, switched by the Gen-Cat:
252 * - For Mn,Mc,Me: the modified Combining_Class.
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700253 * - For Cf: whether it's ZWJ, ZWNJ, or something else.
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800254 * - For Ws: index of which space character this is, if space fallback
255 * is needed, ie. we don't set this by default, only if asked to.
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800256 */
257
Behdad Esfahbodaa7044d2015-11-04 16:25:57 -0800258enum hb_unicode_props_flags_t {
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700259 UPROPS_MASK_GEN_CAT = 0x001Fu,
260 UPROPS_MASK_IGNORABLE = 0x0020u,
Khaled Hosny06cfe3f2017-05-17 21:32:47 +0300261 UPROPS_MASK_HIDDEN = 0x0040u, /* MONGOLIAN FREE VARIATION SELECTOR 1..3,
262 * or TAG characters */
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700263
264 /* If GEN_CAT=FORMAT, top byte masks: */
265 UPROPS_MASK_Cf_ZWJ = 0x0100u,
266 UPROPS_MASK_Cf_ZWNJ = 0x0200u
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200267};
Chun-wei Fan167c3272015-11-09 17:17:56 +0800268HB_MARK_AS_FLAG_T (hb_unicode_props_flags_t);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200269
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700270static inline void
Behdad Esfahbod69862082015-11-04 18:46:22 -0800271_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200272{
Behdad Esfahbod69862082015-11-04 18:46:22 -0800273 hb_unicode_funcs_t *unicode = buffer->unicode;
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800274 unsigned int u = info->codepoint;
275 unsigned int gen_cat = (unsigned int) unicode->general_category (u);
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800276 unsigned int props = gen_cat;
277
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800278 if (u >= 0x80)
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800279 {
Behdad Esfahbode3e4bb02015-11-04 18:58:02 -0800280 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII;
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800281 if (unlikely (unicode->is_default_ignorable (u)))
282 {
Behdad Esfahbod69862082015-11-04 18:46:22 -0800283 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES;
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800284 props |= UPROPS_MASK_IGNORABLE;
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700285 if (u == 0x200Cu) props |= UPROPS_MASK_Cf_ZWNJ;
Behdad Esfahbod81e2b9b2017-10-15 10:48:19 +0200286 else if (u == 0x200Du) props |= UPROPS_MASK_Cf_ZWJ;
Behdad Esfahbodb2030502016-04-26 16:41:17 -0700287 /* Mongolian Free Variation Selectors need to be remembered
288 * because although we need to hide them like default-ignorables,
289 * they need to non-ignorable during shaping. This is similar to
290 * what we do for joiners in Indic-like shapers, but since the
291 * FVSes are GC=Mn, we have use a separate bit to remember them.
292 * Fixes:
ebraminio7c6937e2017-11-20 14:49:22 -0500293 * https://github.com/harfbuzz/harfbuzz/issues/234 */
Behdad Esfahbod81e2b9b2017-10-15 10:48:19 +0200294 else if (unlikely (hb_in_range (u, 0x180Bu, 0x180Du))) props |= UPROPS_MASK_HIDDEN;
Khaled Hosny06cfe3f2017-05-17 21:32:47 +0300295 /* TAG characters need similar treatment. Fixes:
ebraminio7c6937e2017-11-20 14:49:22 -0500296 * https://github.com/harfbuzz/harfbuzz/issues/463 */
Behdad Esfahbod81e2b9b2017-10-15 10:48:19 +0200297 else if (unlikely (hb_in_range (u, 0xE0020u, 0xE007Fu))) props |= UPROPS_MASK_HIDDEN;
298 /* COMBINING GRAPHEME JOINER should not be skipped; at least some times.
ebraminio7c6937e2017-11-20 14:49:22 -0500299 * https://github.com/harfbuzz/harfbuzz/issues/554 */
Behdad Esfahbod8c0d1912018-01-05 12:46:12 +0000300 else if (unlikely (u == 0x034Fu))
301 {
302 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_CGJ;
303 props |= UPROPS_MASK_HIDDEN;
304 }
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800305 }
Behdad Esfahbodaae28472016-02-18 17:06:25 +0700306 else if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL (gen_cat)))
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800307 {
Behdad Esfahbodaae28472016-02-18 17:06:25 +0700308 /* The above check is just an optimization to let in only things we need further
309 * processing on. */
310
Behdad Esfahbod90d75f92015-11-03 12:58:12 -0800311 /* Only Mn and Mc can have non-zero ccc:
Ebrahim Byagowif24b0b92018-04-12 13:40:45 +0430312 * https://unicode.org/policies/stability_policy.html#Property_Value
Behdad Esfahbod90d75f92015-11-03 12:58:12 -0800313 * """
314 * Canonical_Combining_Class, General_Category
315 * All characters other than those with General_Category property values
316 * Spacing_Mark (Mc) and Nonspacing_Mark (Mn) have the Canonical_Combining_Class
317 * property value 0.
318 * 1.1.5+
319 * """
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800320 *
321 * Also, all Mn's that are Default_Ignorable, have ccc=0, hence
322 * the "else if".
Behdad Esfahbod90d75f92015-11-03 12:58:12 -0800323 */
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800324 props |= unicode->modified_combining_class (info->codepoint)<<8;
Behdad Esfahbodaae28472016-02-18 17:06:25 +0700325
326 /* Recategorize emoji skin-tone modifiers as Unicode mark, so they
327 * behave correctly in non-native directionality. They originally
328 * are MODIFIER_SYMBOL. Fixes:
ebraminio7c6937e2017-11-20 14:49:22 -0500329 * https://github.com/harfbuzz/harfbuzz/issues/169
Behdad Esfahbodaae28472016-02-18 17:06:25 +0700330 */
331 if (unlikely (hb_in_range (u, 0x1F3FBu, 0x1F3FFu)))
332 {
333 props = gen_cat = HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK;
334 }
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800335 }
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800336 }
Behdad Esfahboded2024e2015-11-02 17:58:12 -0800337
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800338 info->unicode_props() = props;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200339}
340
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700341static inline void
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200342_hb_glyph_info_set_general_category (hb_glyph_info_t *info,
343 hb_unicode_general_category_t gen_cat)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200344{
Behdad Esfahbodcc5d3a32015-11-04 13:21:25 -0800345 /* Clears top-byte. */
346 info->unicode_props() = (unsigned int) gen_cat | (info->unicode_props() & (0xFF & ~UPROPS_MASK_GEN_CAT));
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200347}
348
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700349static inline hb_unicode_general_category_t
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200350_hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
351{
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800352 return (hb_unicode_general_category_t) (info->unicode_props() & UPROPS_MASK_GEN_CAT);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200353}
354
Behdad Esfahbod2f38dde2015-11-04 13:17:33 -0800355static inline bool
356_hb_glyph_info_is_unicode_mark (const hb_glyph_info_t *info)
357{
358 return HB_UNICODE_GENERAL_CATEGORY_IS_MARK (info->unicode_props() & UPROPS_MASK_GEN_CAT);
359}
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700360static inline void
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200361_hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info,
362 unsigned int modified_class)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200363{
Behdad Esfahbod8249ec32015-11-04 13:26:17 -0800364 if (unlikely (!_hb_glyph_info_is_unicode_mark (info)))
365 return;
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800366 info->unicode_props() = (modified_class<<8) | (info->unicode_props() & 0xFF);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200367}
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700368static inline unsigned int
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200369_hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
370{
Behdad Esfahbod8249ec32015-11-04 13:26:17 -0800371 return _hb_glyph_info_is_unicode_mark (info) ? info->unicode_props()>>8 : 0;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200372}
373
Ebrahim Byagowi1ab16f42018-02-24 12:49:42 +0330374
375/* Loop over grapheme. Based on foreach_cluster(). */
376#define foreach_grapheme(buffer, start, end) \
377 for (unsigned int \
378 _count = buffer->len, \
379 start = 0, end = _count ? _next_grapheme (buffer, 0) : 0; \
380 start < _count; \
381 start = end, end = _next_grapheme (buffer, start))
382
383static inline unsigned int
384_next_grapheme (hb_buffer_t *buffer, unsigned int start)
385{
386 hb_glyph_info_t *info = buffer->info;
387 unsigned int count = buffer->len;
388
389 while (++start < count && _hb_glyph_info_is_unicode_mark (&info[start]))
390 ;
391
392 return start;
393}
394
395
Behdad Esfahbodb6fe0ab2017-10-04 13:37:08 +0200396#define info_cc(info) (_hb_glyph_info_get_modified_combining_class (&(info)))
397
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800398static inline bool
399_hb_glyph_info_is_unicode_space (const hb_glyph_info_t *info)
400{
401 return _hb_glyph_info_get_general_category (info) ==
402 HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR;
403}
404static inline void
Behdad Esfahbod7793aad2015-11-04 14:48:46 -0800405_hb_glyph_info_set_unicode_space_fallback_type (hb_glyph_info_t *info, hb_unicode_funcs_t::space_t s)
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800406{
407 if (unlikely (!_hb_glyph_info_is_unicode_space (info)))
408 return;
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800409 info->unicode_props() = (((unsigned int) s)<<8) | (info->unicode_props() & 0xFF);
410}
Behdad Esfahbod7793aad2015-11-04 14:48:46 -0800411static inline hb_unicode_funcs_t::space_t
412_hb_glyph_info_get_unicode_space_fallback_type (const hb_glyph_info_t *info)
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800413{
Behdad Esfahbod7793aad2015-11-04 14:48:46 -0800414 return _hb_glyph_info_is_unicode_space (info) ?
415 (hb_unicode_funcs_t::space_t) (info->unicode_props()>>8) :
416 hb_unicode_funcs_t::NOT_SPACE;
Behdad Esfahbod9ac4b962015-11-04 14:18:39 -0800417}
418
Behdad Esfahbod4ba796b2015-07-22 17:41:31 +0100419static inline bool _hb_glyph_info_ligated (const hb_glyph_info_t *info);
420
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700421static inline hb_bool_t
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200422_hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
423{
Behdad Esfahbodb2030502016-04-26 16:41:17 -0700424 return (info->unicode_props() & UPROPS_MASK_IGNORABLE) &&
425 !_hb_glyph_info_ligated (info);
426}
427static inline hb_bool_t
Khaled Hosny06cfe3f2017-05-17 21:32:47 +0300428_hb_glyph_info_is_default_ignorable_and_not_hidden (const hb_glyph_info_t *info)
Behdad Esfahbodb2030502016-04-26 16:41:17 -0700429{
Khaled Hosny06cfe3f2017-05-17 21:32:47 +0300430 return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_HIDDEN))
Behdad Esfahbodb2030502016-04-26 16:41:17 -0700431 == UPROPS_MASK_IGNORABLE) &&
432 !_hb_glyph_info_ligated (info);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200433}
Behdad Esfahbod8c0d1912018-01-05 12:46:12 +0000434static inline void
435_hb_glyph_info_unhide (hb_glyph_info_t *info)
436{
437 info->unicode_props() &= ~ UPROPS_MASK_HIDDEN;
438}
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200439
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700440static inline bool
441_hb_glyph_info_is_unicode_format (const hb_glyph_info_t *info)
442{
443 return _hb_glyph_info_get_general_category (info) ==
444 HB_UNICODE_GENERAL_CATEGORY_FORMAT;
445}
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700446static inline hb_bool_t
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200447_hb_glyph_info_is_zwnj (const hb_glyph_info_t *info)
448{
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700449 return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & UPROPS_MASK_Cf_ZWNJ);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200450}
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700451static inline hb_bool_t
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200452_hb_glyph_info_is_zwj (const hb_glyph_info_t *info)
453{
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700454 return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & UPROPS_MASK_Cf_ZWJ);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200455}
Behdad Esfahbod815bdd72016-02-22 18:22:44 +0900456static inline hb_bool_t
457_hb_glyph_info_is_joiner (const hb_glyph_info_t *info)
458{
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700459 return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & (UPROPS_MASK_Cf_ZWNJ|UPROPS_MASK_Cf_ZWJ));
Behdad Esfahbod815bdd72016-02-22 18:22:44 +0900460}
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700461static inline void
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200462_hb_glyph_info_flip_joiners (hb_glyph_info_t *info)
463{
Behdad Esfahbod21ab5502016-04-26 16:02:04 -0700464 if (!_hb_glyph_info_is_unicode_format (info))
465 return;
466 info->unicode_props() ^= UPROPS_MASK_Cf_ZWNJ | UPROPS_MASK_Cf_ZWJ;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200467}
468
469/* lig_props: aka lig_id / lig_comp
470 *
471 * When a ligature is formed:
472 *
473 * - The ligature glyph and any marks in between all the same newly allocated
474 * lig_id,
475 * - The ligature glyph will get lig_num_comps set to the number of components
476 * - The marks get lig_comp > 0, reflecting which component of the ligature
477 * they were applied to.
478 * - This is used in GPOS to attach marks to the right component of a ligature
479 * in MarkLigPos,
480 * - Note that when marks are ligated together, much of the above is skipped
481 * and the current lig_id reused.
482 *
483 * When a multiple-substitution is done:
484 *
485 * - All resulting glyphs will have lig_id = 0,
486 * - The resulting glyphs will have lig_comp = 0, 1, 2, ... respectively.
487 * - This is used in GPOS to attach marks to the first component of a
488 * multiple substitution in MarkBasePos.
489 *
490 * The numbers are also used in GPOS to do mark-to-mark positioning only
491 * to marks that belong to the same component of the same ligature.
492 */
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200493
494static inline void
495_hb_glyph_info_clear_lig_props (hb_glyph_info_t *info)
496{
497 info->lig_props() = 0;
498}
499
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200500#define IS_LIG_BASE 0x10
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200501
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200502static inline void
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200503_hb_glyph_info_set_lig_props_for_ligature (hb_glyph_info_t *info,
504 unsigned int lig_id,
505 unsigned int lig_num_comps)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200506{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200507 info->lig_props() = (lig_id << 5) | IS_LIG_BASE | (lig_num_comps & 0x0F);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200508}
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200509
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200510static inline void
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200511_hb_glyph_info_set_lig_props_for_mark (hb_glyph_info_t *info,
512 unsigned int lig_id,
513 unsigned int lig_comp)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200514{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200515 info->lig_props() = (lig_id << 5) | (lig_comp & 0x0F);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200516}
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200517
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200518static inline void
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200519_hb_glyph_info_set_lig_props_for_component (hb_glyph_info_t *info, unsigned int comp)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200520{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200521 _hb_glyph_info_set_lig_props_for_mark (info, 0, comp);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200522}
523
524static inline unsigned int
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200525_hb_glyph_info_get_lig_id (const hb_glyph_info_t *info)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200526{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200527 return info->lig_props() >> 5;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200528}
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200529
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200530static inline bool
Behdad Esfahboda1f7b282013-10-18 01:09:08 +0200531_hb_glyph_info_ligated_internal (const hb_glyph_info_t *info)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200532{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200533 return !!(info->lig_props() & IS_LIG_BASE);
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200534}
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200535
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200536static inline unsigned int
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200537_hb_glyph_info_get_lig_comp (const hb_glyph_info_t *info)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200538{
Behdad Esfahboda1f7b282013-10-18 01:09:08 +0200539 if (_hb_glyph_info_ligated_internal (info))
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200540 return 0;
541 else
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200542 return info->lig_props() & 0x0F;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200543}
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200544
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200545static inline unsigned int
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200546_hb_glyph_info_get_lig_num_comps (const hb_glyph_info_t *info)
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200547{
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200548 if ((info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE) &&
Behdad Esfahboda1f7b282013-10-18 01:09:08 +0200549 _hb_glyph_info_ligated_internal (info))
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200550 return info->lig_props() & 0x0F;
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200551 else
552 return 1;
553}
554
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200555static inline uint8_t
556_hb_allocate_lig_id (hb_buffer_t *buffer) {
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200557 uint8_t lig_id = buffer->next_serial () & 0x07;
558 if (unlikely (!lig_id))
Behdad Esfahbod3ddf8922013-10-18 00:02:43 +0200559 lig_id = _hb_allocate_lig_id (buffer); /* in case of overflow */
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200560 return lig_id;
561}
562
Behdad Esfahbod91689de2013-10-18 00:21:59 +0200563/* glyph_props: */
564
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700565static inline void
Behdad Esfahbod91689de2013-10-18 00:21:59 +0200566_hb_glyph_info_set_glyph_props (hb_glyph_info_t *info, unsigned int props)
567{
568 info->glyph_props() = props;
569}
570
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700571static inline unsigned int
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200572_hb_glyph_info_get_glyph_props (const hb_glyph_info_t *info)
573{
574 return info->glyph_props();
575}
Behdad Esfahbod91689de2013-10-18 00:21:59 +0200576
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700577static inline bool
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200578_hb_glyph_info_is_base_glyph (const hb_glyph_info_t *info)
579{
580 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH);
581}
582
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700583static inline bool
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200584_hb_glyph_info_is_ligature (const hb_glyph_info_t *info)
585{
586 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE);
587}
588
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700589static inline bool
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200590_hb_glyph_info_is_mark (const hb_glyph_info_t *info)
591{
592 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
593}
594
Behdad Esfahboda1f7b282013-10-18 01:09:08 +0200595static inline bool
Behdad Esfahbod85702732013-10-18 01:11:05 +0200596_hb_glyph_info_substituted (const hb_glyph_info_t *info)
597{
598 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED);
599}
600
601static inline bool
Behdad Esfahboda1f7b282013-10-18 01:09:08 +0200602_hb_glyph_info_ligated (const hb_glyph_info_t *info)
603{
604 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATED);
605}
606
Behdad Esfahbod832a6f92014-06-04 16:57:42 -0400607static inline bool
608_hb_glyph_info_multiplied (const hb_glyph_info_t *info)
609{
610 return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED);
611}
612
613static inline bool
614_hb_glyph_info_ligated_and_didnt_multiply (const hb_glyph_info_t *info)
615{
616 return _hb_glyph_info_ligated (info) && !_hb_glyph_info_multiplied (info);
617}
618
Behdad Esfahbod04dc52f2014-06-06 17:28:38 -0400619static inline void
620_hb_glyph_info_clear_ligated_and_multiplied (hb_glyph_info_t *info)
621{
622 info->glyph_props() &= ~(HB_OT_LAYOUT_GLYPH_PROPS_LIGATED |
623 HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED);
624}
625
Behdad Esfahbod595936e2015-07-21 14:15:35 +0100626static inline void
Behdad Esfahbod2ab0de92015-12-17 11:59:15 +0000627_hb_glyph_info_clear_substituted (hb_glyph_info_t *info)
Behdad Esfahbod595936e2015-07-21 14:15:35 +0100628{
Behdad Esfahbod2ab0de92015-12-17 11:59:15 +0000629 info->glyph_props() &= ~(HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED);
Behdad Esfahbod595936e2015-07-21 14:15:35 +0100630}
631
Behdad Esfahbod04dc52f2014-06-06 17:28:38 -0400632
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200633/* Allocation / deallocation. */
634
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700635static inline void
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200636_hb_buffer_allocate_unicode_vars (hb_buffer_t *buffer)
637{
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800638 HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props);
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200639}
640
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700641static inline void
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200642_hb_buffer_deallocate_unicode_vars (hb_buffer_t *buffer)
643{
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800644 HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props);
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200645}
646
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700647static inline void
Behdad Esfahbod8f3eebf2014-08-02 17:18:46 -0400648_hb_buffer_assert_unicode_vars (hb_buffer_t *buffer)
649{
Behdad Esfahbod9382c472015-11-02 17:36:51 -0800650 HB_BUFFER_ASSERT_VAR (buffer, unicode_props);
Behdad Esfahbod8f3eebf2014-08-02 17:18:46 -0400651}
652
653static inline void
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200654_hb_buffer_allocate_gsubgpos_vars (hb_buffer_t *buffer)
655{
656 HB_BUFFER_ALLOCATE_VAR (buffer, glyph_props);
657 HB_BUFFER_ALLOCATE_VAR (buffer, lig_props);
658 HB_BUFFER_ALLOCATE_VAR (buffer, syllable);
659}
660
Behdad Esfahbod6faff8e2014-04-28 14:29:39 -0700661static inline void
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200662_hb_buffer_deallocate_gsubgpos_vars (hb_buffer_t *buffer)
663{
664 HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
665 HB_BUFFER_DEALLOCATE_VAR (buffer, lig_props);
666 HB_BUFFER_DEALLOCATE_VAR (buffer, glyph_props);
667}
668
Behdad Esfahbod8f3eebf2014-08-02 17:18:46 -0400669static inline void
670_hb_buffer_assert_gsubgpos_vars (hb_buffer_t *buffer)
671{
672 HB_BUFFER_ASSERT_VAR (buffer, glyph_props);
673 HB_BUFFER_ASSERT_VAR (buffer, lig_props);
674 HB_BUFFER_ASSERT_VAR (buffer, syllable);
675}
676
Behdad Esfahbod101303d2013-10-18 00:42:39 +0200677/* Make sure no one directly touches our props... */
678#undef unicode_props0
679#undef unicode_props1
680#undef lig_props
681#undef glyph_props
Behdad Esfahbod2e96d2c2013-10-17 21:16:20 +0200682
Behdad Esfahbod0f0cd9d2010-06-09 06:32:56 -0400683#endif /* HB_OT_LAYOUT_PRIVATE_HH */