hb-unicode-private.hh revision 3e10460a1dd41de32752e308771aa30d23565cc0
15c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod/* 22409d5f8d7dd8b535ce5ea29e933f7db27d33793Behdad Esfahbod * Copyright © 2009 Red Hat, Inc. 36af9cff5e17e82100b435c8d21aed0765296d58dBehdad Esfahbod * Copyright © 2011 Codethink Limited 46adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbod * Copyright © 2010,2011,2012 Google, Inc. 55c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * 6c755cb3e3ac55156d0d2ec05adea7a650b97cc41Behdad Esfahbod * This is part of HarfBuzz, a text shaping library. 75c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * 85c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * Permission is hereby granted, without written agreement and without 95c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * license or royalty fees, to use, copy, modify, and distribute this 105c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * software and its documentation for any purpose, provided that the 115c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * above copyright notice and the following two paragraphs appear in 125c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * all copies of this software. 135c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * 145c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 155c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 165c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 175c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 185c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * DAMAGE. 195c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * 205c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 215c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 225c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 235c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 245c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 255c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * 265c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * Red Hat Author(s): Behdad Esfahbod 272fd0c577e322ccbf762927bc4600b3ea31db4c80Ryan Lortie * Codethink Author(s): Ryan Lortie 28fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod * Google Author(s): Behdad Esfahbod 295c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod */ 305c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 31fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod#ifndef HB_UNICODE_PRIVATE_HH 32fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod#define HB_UNICODE_PRIVATE_HH 335c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 34c57d454accff66e5f2c58006e8fb40bc020b6182Behdad Esfahbod#include "hb-private.hh" 35fca368c4682624346a0aaee690e1ad6ed4c0b337Behdad Esfahbod#include "hb-object-private.hh" 365c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 375c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 386adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbodextern HB_INTERNAL const uint8_t _hb_modified_combining_class[256]; 39acdba3f90b232fc12fcb200dca2584481b339118Behdad Esfahbod 405c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod/* 415c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod * hb_unicode_funcs_t 425c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod */ 435c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 444b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \ 45891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (combining_class) \ 46891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \ 47891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (general_category) \ 48891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (mirroring) \ 49891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (script) \ 50c4641723fbf6532b2e80a662e15573b31276bc73Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (compose) \ 51c4641723fbf6532b2e80a662e15573b31276bc73Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (decompose) \ 52378d279bbf692195c4654e312dae854ab3be04cfBehdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \ 534b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod /* ^--- Add new callbacks here */ 544b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod 55891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */ 56891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \ 5721fdcee00125b6e1c09f0bed3064d16ccd3a7a5dBehdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \ 58891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \ 59891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \ 60891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \ 61891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \ 62891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod /* ^--- Add new simple callbacks here */ 63891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod 641bc1cb3603167f5da309336f7018c8b0608ac104Behdad Esfahbodstruct hb_unicode_funcs_t { 65fca368c4682624346a0aaee690e1ad6ed4c0b337Behdad Esfahbod hb_object_header_t header; 666220e5fc0dad728e67a92e838d3ac275d032f2c7Behdad Esfahbod ASSERT_POD (); 67fca368c4682624346a0aaee690e1ad6ed4c0b337Behdad Esfahbod 682fd0c577e322ccbf762927bc4600b3ea31db4c80Ryan Lortie hb_unicode_funcs_t *parent; 695c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 70fca368c4682624346a0aaee690e1ad6ed4c0b337Behdad Esfahbod bool immutable; 71eb27ec0cef0d92740875ab5035b53acc639e5faeBehdad Esfahbod 727470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod#define HB_UNICODE_FUNC_IMPLEMENT(return_type, name) \ 737470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod inline return_type name (hb_codepoint_t unicode) { return func.name (this, unicode, user_data.name); } 747470315a3e782aa6192bbe64f7a3944266fb1521Behdad EsfahbodHB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE 757470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod#undef HB_UNICODE_FUNC_IMPLEMENT 767470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod 777470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod inline hb_bool_t compose (hb_codepoint_t a, hb_codepoint_t b, 787470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod hb_codepoint_t *ab) 797470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod { 807470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod *ab = 0; 81d5045a5f4017631a4660f985fe451c5a64c42ca0Behdad Esfahbod if (unlikely (!a || !b)) return false; 820f8881d6bbf6cd59938315eeff9b71cfc736aa4eBehdad Esfahbod return func.compose (this, a, b, ab, user_data.compose); 837470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod } 847470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod 857470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod inline hb_bool_t decompose (hb_codepoint_t ab, 867470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod hb_codepoint_t *a, hb_codepoint_t *b) 877470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod { 88d5045a5f4017631a4660f985fe451c5a64c42ca0Behdad Esfahbod *a = ab; *b = 0; 897470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod return func.decompose (this, ab, a, b, user_data.decompose); 907470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod } 917470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod 927470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod inline unsigned int decompose_compatibility (hb_codepoint_t u, 937470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod hb_codepoint_t *decomposed) 947470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod { 957470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod unsigned int ret = func.decompose_compatibility (this, u, decomposed, user_data.decompose_compatibility); 967470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod if (ret == 1 && u == decomposed[0]) { 977470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod decomposed[0] = 0; 987470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod return 0; 997470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod } 1007470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod decomposed[ret] = 0; 1017470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod return ret; 1027470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod } 1037470315a3e782aa6192bbe64f7a3944266fb1521Behdad Esfahbod 104fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod 105878a25375b2fdf64cf0cc30c23fca9fcd58548e8Behdad Esfahbod inline unsigned int 1066adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbod modified_combining_class (hb_codepoint_t unicode) 1076adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbod { 1081c8654ead41ca746d577549c92d2a41c594ab639Behdad Esfahbod /* XXX This hack belongs to the Myanmar shaper. */ 1097627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod if (unlikely (unicode == 0x1037u)) unicode = 0x103Au; 11015f67048e45853ad4069fd4334e132bc3db4d2c4Behdad Esfahbod 11115f67048e45853ad4069fd4334e132bc3db4d2c4Behdad Esfahbod /* XXX This hack belongs to the SEA shaper (for Tai Tham): 11215f67048e45853ad4069fd4334e132bc3db4d2c4Behdad Esfahbod * Reorder SAKOT to ensure it comes after any tone marks. */ 1137627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod if (unlikely (unicode == 0x1A60u)) return 254; 1141c8654ead41ca746d577549c92d2a41c594ab639Behdad Esfahbod 1159c9411839bb89d0a1a83120af0982c60e0e393d9Behdad Esfahbod /* XXX This hack belongs to the Tibetan shaper: 1169c9411839bb89d0a1a83120af0982c60e0e393d9Behdad Esfahbod * Reorder PADMA to ensure it comes after any vowel marks. */ 1177627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod if (unlikely (unicode == 0x0FC6u)) return 254; 1189c9411839bb89d0a1a83120af0982c60e0e393d9Behdad Esfahbod 1196adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbod return _hb_modified_combining_class[combining_class (unicode)]; 1206adf417bc15d4524e280b284e3accd1ae647662eBehdad Esfahbod } 121208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod 122878a25375b2fdf64cf0cc30c23fca9fcd58548e8Behdad Esfahbod static inline hb_bool_t 123208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod is_variation_selector (hb_codepoint_t unicode) 124208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod { 125164c13d73f67fdddba28e6409d76b4903e8ffab3Behdad Esfahbod /* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the 126164c13d73f67fdddba28e6409d76b4903e8ffab3Behdad Esfahbod * Arabic shaper. No need to match them here. */ 1277627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod return unlikely (hb_in_ranges (unicode, 1287627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod 0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */ 1297627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod 0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */ 130208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod } 131208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod 132cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod /* Default_Ignorable codepoints: 133208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod * 134391934db0a171aeb2057ebcd4a38ed81621e7393Jonathan Kew * Note: While U+115F, U+1160, U+3164 and U+FFA0 are Default_Ignorable, 135391934db0a171aeb2057ebcd4a38ed81621e7393Jonathan Kew * we do NOT want to hide them, as the way Uniscribe has implemented them 136391934db0a171aeb2057ebcd4a38ed81621e7393Jonathan Kew * is with regular spacing glyphs, and that's the way fonts are made to work. 137391934db0a171aeb2057ebcd4a38ed81621e7393Jonathan Kew * As such, we make exceptions for those four. 138cc50bf5b13bfe88137fa7a42782872c40fb9aefbBehdad Esfahbod * 139577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * Unicode 7.0: 140577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.txt | sed 's/;.*#/#/' 141577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 00AD # Cf SOFT HYPHEN 142577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 034F # Mn COMBINING GRAPHEME JOINER 143577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 061C # Cf ARABIC LETTER MARK 144577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 115F..1160 # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER 145577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 17B4..17B5 # Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA 146577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 180B..180D # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE 147577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 180E # Cf MONGOLIAN VOWEL SEPARATOR 148577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 200B..200F # Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK 149577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 202A..202E # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE 150577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 2060..2064 # Cf [5] WORD JOINER..INVISIBLE PLUS 151577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 2065 # Cn <reserved-2065> 152577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 2066..206F # Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES 153577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 3164 # Lo HANGUL FILLER 154577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * FE00..FE0F # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 155577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * FEFF # Cf ZERO WIDTH NO-BREAK SPACE 156577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * FFA0 # Lo HALFWIDTH HANGUL FILLER 157577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * FFF0..FFF8 # Cn [9] <reserved-FFF0>..<reserved-FFF8> 158577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 1BCA0..1BCA3 # Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP 159577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * 1D173..1D17A # Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE 160577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0000 # Cn <reserved-E0000> 161577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0001 # Cf LANGUAGE TAG 162577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0002..E001F # Cn [30] <reserved-E0002>..<reserved-E001F> 163577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0020..E007F # Cf [96] TAG SPACE..CANCEL TAG 164577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0080..E00FF # Cn [128] <reserved-E0080>..<reserved-E00FF> 165577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E0100..E01EF # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 166577ca4814314c374824cac736996b9cdd4f9d11fBehdad Esfahbod * E01F0..E0FFF # Cn [3600] <reserved-E01F0>..<reserved-E0FFF> 167208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod */ 168878a25375b2fdf64cf0cc30c23fca9fcd58548e8Behdad Esfahbod static inline hb_bool_t 169cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod is_default_ignorable (hb_codepoint_t ch) 170208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod { 171cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod hb_codepoint_t plane = ch >> 16; 172cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod if (likely (plane == 0)) 173cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod { 174cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod /* BMP */ 175cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod hb_codepoint_t page = ch >> 8; 176cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod switch (page) { 1777627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x00: return unlikely (ch == 0x00ADu); 1787627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x03: return unlikely (ch == 0x034Fu); 1797627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x06: return unlikely (ch == 0x061Cu); 1807627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u); 1817627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu); 1827627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x20: return hb_in_ranges (ch, 0x200Bu, 0x200Fu, 1837627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod 0x202Au, 0x202Eu, 1847627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod 0x2060u, 0x206Fu); 1857627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; 1867627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u); 187cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod default: return false; 188cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod } 189cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod } 190cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod else 191cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod { 192cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod /* Other planes */ 193cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod switch (plane) { 1947627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u, 1957627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod 0x1D173u, 0x1D17Au); 1967627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu); 197cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod default: return false; 198cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod } 199cf3afd8979b1db76d437f428cbd51cb363e0d18eBehdad Esfahbod } 200208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod } 201208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod 20249ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod /* Space estimates based on: 20349ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod * http://www.unicode.org/charts/PDF/U2000.pdf 20449ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod * https://www.microsoft.com/typography/developers/fdsspec/spaces.aspx 20549ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod */ 2067793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod enum space_t { 2077793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod NOT_SPACE = 0, 20849ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM = 1, 20949ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_2 = 2, 21049ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_3 = 3, 21149ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_4 = 4, 21249ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_5 = 5, 21349ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_6 = 6, 21449ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_EM_16 = 16, 21549ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE_4_EM_18, /* 4/18th of an EM! */ 21649ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod SPACE, 2177793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod SPACE_FIGURE, 2187793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod SPACE_PUNCTUATION, 2197793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod SPACE_NARROW, 2207793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod }; 2217793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod static inline space_t 2227793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod space_fallback_type (hb_codepoint_t u) 2237793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod { 2247793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod switch (u) 2257793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod { 2267793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod /* All GC=Zs chars that can use a fallback. */ 2273e10460a1dd41de32752e308771aa30d23565cc0Behdad Esfahbod default: return NOT_SPACE; /* U+1680 OGHAM SPACE MARK */ 22849ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x0020u: return SPACE; /* U+0020 SPACE */ 22949ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x00A0u: return SPACE; /* U+00A0 NO-BREAK SPACE */ 23049ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2000u: return SPACE_EM_2; /* U+2000 EN QUAD */ 23149ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2001u: return SPACE_EM; /* U+2001 EM QUAD */ 23249ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2002u: return SPACE_EM_2; /* U+2002 EN SPACE */ 23349ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2003u: return SPACE_EM; /* U+2003 EM SPACE */ 23449ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2004u: return SPACE_EM_3; /* U+2004 THREE-PER-EM SPACE */ 23549ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2005u: return SPACE_EM_4; /* U+2005 FOUR-PER-EM SPACE */ 23649ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2006u: return SPACE_EM_6; /* U+2006 SIX-PER-EM SPACE */ 23749ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2007u: return SPACE_FIGURE; /* U+2007 FIGURE SPACE */ 23849ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2008u: return SPACE_PUNCTUATION; /* U+2008 PUNCTUATION SPACE */ 23949ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x2009u: return SPACE_EM_5; /* U+2009 THIN SPACE */ 24049ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x200Au: return SPACE_EM_16; /* U+200A HAIR SPACE */ 24149ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x202Fu: return SPACE_NARROW; /* U+202F NARROW NO-BREAK SPACE */ 24249ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x205Fu: return SPACE_4_EM_18; /* U+205F MEDIUM MATHEMATICAL SPACE */ 24349ef630936325b2e56a870fcef9aa8473a8f8526Behdad Esfahbod case 0x3000u: return SPACE_EM; /* U+3000 IDEOGRAPHIC SPACE */ 2447793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod } 2457793aad946e09b53523b30d57de85abd1d15f8b6Behdad Esfahbod } 246208f70f0553d73d2908b21b9552298029482a8b9Behdad Esfahbod 247fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod struct { 248c4641723fbf6532b2e80a662e15573b31276bc73Behdad Esfahbod#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name; 2494b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS 2504b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod#undef HB_UNICODE_FUNC_IMPLEMENT 251c4641723fbf6532b2e80a662e15573b31276bc73Behdad Esfahbod } func; 252fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod 253fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod struct { 254891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod#define HB_UNICODE_FUNC_IMPLEMENT(name) void *name; 2554b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS 2564b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod#undef HB_UNICODE_FUNC_IMPLEMENT 257fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod } user_data; 258fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod 259bf36a1074ab23abeab0a7a6c47db26770dc1ab0aBehdad Esfahbod struct { 260891c4755baae6cd59fad59d27fd8933e5f548a74Behdad Esfahbod#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_destroy_func_t name; 2614b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS 2624b6317c4f426cfaf21e509dbf6ee6d4e0422cdacBehdad Esfahbod#undef HB_UNICODE_FUNC_IMPLEMENT 263fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod } destroy; 2645c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod}; 2655c44188455ca1b696aa24b20c3a83877dfae2fb2Behdad Esfahbod 266d4bee9f813bb299b1c4aab7c33d588be2a7d354bBehdad Esfahbod 2679a5b421a64db1bb23d5c6ebbc3bf3f3a5513dc36Behdad Esfahbodextern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil; 268d4bee9f813bb299b1c4aab7c33d588be2a7d354bBehdad Esfahbod 269af9e104028b7cdc1fbba0eb1d86cfa4d5258657fBehdad Esfahbod 27021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Modified combining marks */ 27121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 27221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Hebrew 27321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 27421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * We permute the "fixed-position" classes 10-26 into the order 27521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * described in the SBL Hebrew manual: 27621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 27721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf 27821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 27921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * (as recommended by: 28021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * http://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering-t6751.0.html) 28121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 28221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * More details here: 28321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * https://bugzilla.mozilla.org/show_bug.cgi?id=662055 28421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod */ 28521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC10 22 /* sheva */ 28621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC11 15 /* hataf segol */ 28721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC12 16 /* hataf patah */ 28821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC13 17 /* hataf qamats */ 28921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC14 23 /* hiriq */ 29021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC15 18 /* tsere */ 29121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC16 19 /* segol */ 29221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC17 20 /* patah */ 29321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC18 21 /* qamats */ 29421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC19 14 /* holam */ 29521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC20 24 /* qubuts */ 29621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC21 12 /* dagesh */ 29721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC22 25 /* meteg */ 29821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC23 13 /* rafe */ 29921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC24 10 /* shin dot */ 30021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC25 11 /* sin dot */ 30121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC26 26 /* point varika */ 30221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 30321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* 30421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * Arabic 30521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 30621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * Modify to move Shadda (ccc=33) before other marks. See: 30721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * http://unicode.org/faq/normalization.html#8 30821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * http://unicode.org/faq/normalization.html#9 30921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod */ 31021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC27 28 /* fathatan */ 31121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC28 29 /* dammatan */ 31221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC29 30 /* kasratan */ 31321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC30 31 /* fatha */ 31421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC31 32 /* damma */ 31521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC32 33 /* kasra */ 31621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC33 27 /* shadda */ 31721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC34 34 /* sukun */ 31821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC35 35 /* superscript alef */ 31921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 32021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Syriac */ 32121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC36 36 /* superscript alaph */ 32221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 32321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Telugu 32421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 32521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * Modify Telugu length marks (ccc=84, ccc=91). 32621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * These are the only matras in the main Indic scripts range that have 32721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * a non-zero ccc. That makes them reorder with the Halant that is 32821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * ccc=9. Just zero them, we don't need them in our Indic shaper. 32921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod */ 33021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC84 0 /* length mark */ 33121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC91 0 /* ai length mark */ 33221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 33321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Thai 33421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod * 33556c9e7c004e802ddcb8c704346026f1d7a812f9fBehdad Esfahbod * Modify U+0E38 and U+0E39 (ccc=103) to be reordered before U+0E3A (ccc=9). 33656c9e7c004e802ddcb8c704346026f1d7a812f9fBehdad Esfahbod * Assign 3, which is unassigned otherwise. 33756c9e7c004e802ddcb8c704346026f1d7a812f9fBehdad Esfahbod * Uniscribe does this reordering too. 33821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod */ 33921756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC103 3 /* sara u / sara uu */ 34021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC107 107 /* mai * */ 34121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 34221756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Lao */ 34321756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC118 118 /* sign u / sign uu */ 34421756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */ 34521756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 34621756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod/* Tibetan */ 34721756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */ 34821756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */ 34956c9e7c004e802ddcb8c704346026f1d7a812f9fBehdad Esfahbod#define HB_MODIFIED_COMBINING_CLASS_CCC132 132 /* sign u */ 35021756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 35121756934a15e31dc243e2b6d80adec5752477652Behdad Esfahbod 352028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod/* Misc */ 353028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod 354028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod#define HB_UNICODE_GENERAL_CATEGORY_IS_MARK(gen_cat) \ 355f8160a495966c790b79134a9f9382b6545f8c733Behdad Esfahbod (FLAG_SAFE (gen_cat) & \ 356028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ 357028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \ 358028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))) 359028a1706f898bfcee0d14acfba47ebe1de09f0c4Behdad Esfahbod 360aae2847099cbf05bf0668fbe526fc58736837c1bBehdad Esfahbod#define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL(gen_cat) \ 36190d75f93bb85aeb627c4e6bb9e4cbd75895c99f7Behdad Esfahbod (FLAG_SAFE (gen_cat) & \ 36290d75f93bb85aeb627c4e6bb9e4cbd75895c99f7Behdad Esfahbod (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ 363aae2847099cbf05bf0668fbe526fc58736837c1bBehdad Esfahbod FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \ 364aae2847099cbf05bf0668fbe526fc58736837c1bBehdad Esfahbod FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL))) 36590d75f93bb85aeb627c4e6bb9e4cbd75895c99f7Behdad Esfahbod 366fb194b8794898f51eb596fa4092c26606889d376Behdad Esfahbod#endif /* HB_UNICODE_PRIVATE_HH */ 367