hb-unicode.cc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. /*
  2. * Copyright © 2009 Red Hat, Inc.
  3. * Copyright © 2011 Codethink Limited
  4. * Copyright © 2010,2011,2012 Google, Inc.
  5. *
  6. * This is part of HarfBuzz, a text shaping library.
  7. *
  8. * Permission is hereby granted, without written agreement and without
  9. * license or royalty fees, to use, copy, modify, and distribute this
  10. * software and its documentation for any purpose, provided that the
  11. * above copyright notice and the following two paragraphs appear in
  12. * all copies of this software.
  13. *
  14. * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
  15. * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  16. * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
  17. * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  18. * DAMAGE.
  19. *
  20. * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
  21. * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  22. * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
  23. * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
  24. * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  25. *
  26. * Red Hat Author(s): Behdad Esfahbod
  27. * Codethink Author(s): Ryan Lortie
  28. * Google Author(s): Behdad Esfahbod
  29. */
  30. #include "hb.hh"
  31. #include "hb-unicode.hh"
  32. /**
  33. * SECTION: hb-unicode
  34. * @title: hb-unicode
  35. * @short_description: Unicode character property access
  36. * @include: hb.h
  37. *
  38. * Unicode functions are used to access Unicode character properties.
  39. * With these functions, client programs can query various properties from
  40. * the Unicode Character Database for any code point, such as General
  41. * Category (gc), Script (sc), Canonical Combining Class (ccc), etc.
  42. *
  43. * Client programs can optionally pass in their own Unicode functions
  44. * that implement the same queries. The set of functions available is
  45. * defined by the virtual methods in #hb_unicode_funcs_t.
  46. *
  47. * HarfBuzz provides built-in default functions for each method in
  48. * #hb_unicode_funcs_t.
  49. **/
  50. /*
  51. * hb_unicode_funcs_t
  52. */
  53. static hb_unicode_combining_class_t
  54. hb_unicode_combining_class_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  55. hb_codepoint_t unicode HB_UNUSED,
  56. void *user_data HB_UNUSED)
  57. {
  58. return HB_UNICODE_COMBINING_CLASS_NOT_REORDERED;
  59. }
  60. #ifndef HB_DISABLE_DEPRECATED
  61. static unsigned int
  62. hb_unicode_eastasian_width_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  63. hb_codepoint_t unicode HB_UNUSED,
  64. void *user_data HB_UNUSED)
  65. {
  66. return 1;
  67. }
  68. #endif
  69. static hb_unicode_general_category_t
  70. hb_unicode_general_category_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  71. hb_codepoint_t unicode HB_UNUSED,
  72. void *user_data HB_UNUSED)
  73. {
  74. return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER;
  75. }
  76. static hb_codepoint_t
  77. hb_unicode_mirroring_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  78. hb_codepoint_t unicode,
  79. void *user_data HB_UNUSED)
  80. {
  81. return unicode;
  82. }
  83. static hb_script_t
  84. hb_unicode_script_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  85. hb_codepoint_t unicode HB_UNUSED,
  86. void *user_data HB_UNUSED)
  87. {
  88. return HB_SCRIPT_UNKNOWN;
  89. }
  90. static hb_bool_t
  91. hb_unicode_compose_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  92. hb_codepoint_t a HB_UNUSED,
  93. hb_codepoint_t b HB_UNUSED,
  94. hb_codepoint_t *ab HB_UNUSED,
  95. void *user_data HB_UNUSED)
  96. {
  97. return false;
  98. }
  99. static hb_bool_t
  100. hb_unicode_decompose_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  101. hb_codepoint_t ab HB_UNUSED,
  102. hb_codepoint_t *a HB_UNUSED,
  103. hb_codepoint_t *b HB_UNUSED,
  104. void *user_data HB_UNUSED)
  105. {
  106. return false;
  107. }
  108. #ifndef HB_DISABLE_DEPRECATED
  109. static unsigned int
  110. hb_unicode_decompose_compatibility_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
  111. hb_codepoint_t u HB_UNUSED,
  112. hb_codepoint_t *decomposed HB_UNUSED,
  113. void *user_data HB_UNUSED)
  114. {
  115. return 0;
  116. }
  117. #endif
  118. #if !defined(HB_NO_UNICODE_FUNCS) && defined(HAVE_GLIB)
  119. #include "hb-glib.h"
  120. #endif
  121. #if !defined(HB_NO_UNICODE_FUNCS) && defined(HAVE_ICU) && defined(HAVE_ICU_BUILTIN)
  122. #include "hb-icu.h"
  123. #endif
  124. /**
  125. * hb_unicode_funcs_get_default:
  126. *
  127. * Fetches a pointer to the default Unicode-functions structure that is used
  128. * when no functions are explicitly set on #hb_buffer_t.
  129. *
  130. * Return value: (transfer none): a pointer to the #hb_unicode_funcs_t Unicode-functions structure
  131. *
  132. * Since: 0.9.2
  133. **/
  134. hb_unicode_funcs_t *
  135. hb_unicode_funcs_get_default ()
  136. {
  137. #if !defined(HB_NO_UNICODE_FUNCS) && !defined(HB_NO_UCD)
  138. return hb_ucd_get_unicode_funcs ();
  139. #elif !defined(HB_NO_UNICODE_FUNCS) && defined(HAVE_GLIB)
  140. return hb_glib_get_unicode_funcs ();
  141. #elif !defined(HB_NO_UNICODE_FUNCS) && defined(HAVE_ICU) && defined(HAVE_ICU_BUILTIN)
  142. return hb_icu_get_unicode_funcs ();
  143. #else
  144. #define HB_UNICODE_FUNCS_NIL 1
  145. return hb_unicode_funcs_get_empty ();
  146. #endif
  147. }
  148. #if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL)
  149. #error "Could not find any Unicode functions implementation, you have to provide your own"
  150. #error "Consider building hb-ucd.cc. If you absolutely want to build without any, check the code."
  151. #endif
  152. /**
  153. * hb_unicode_funcs_create:
  154. * @parent: (nullable): Parent Unicode-functions structure
  155. *
  156. * Creates a new #hb_unicode_funcs_t structure of Unicode functions.
  157. *
  158. * Return value: (transfer full): The Unicode-functions structure
  159. *
  160. * Since: 0.9.2
  161. **/
  162. hb_unicode_funcs_t *
  163. hb_unicode_funcs_create (hb_unicode_funcs_t *parent)
  164. {
  165. hb_unicode_funcs_t *ufuncs;
  166. if (!(ufuncs = hb_object_create<hb_unicode_funcs_t> ()))
  167. return hb_unicode_funcs_get_empty ();
  168. if (!parent)
  169. parent = hb_unicode_funcs_get_empty ();
  170. hb_unicode_funcs_make_immutable (parent);
  171. ufuncs->parent = hb_unicode_funcs_reference (parent);
  172. ufuncs->func = parent->func;
  173. /* We can safely copy user_data from parent since we hold a reference
  174. * onto it and it's immutable. We should not copy the destroy notifiers
  175. * though. */
  176. ufuncs->user_data = parent->user_data;
  177. return ufuncs;
  178. }
  179. DEFINE_NULL_INSTANCE (hb_unicode_funcs_t) =
  180. {
  181. HB_OBJECT_HEADER_STATIC,
  182. nullptr, /* parent */
  183. {
  184. #define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_nil,
  185. HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
  186. #undef HB_UNICODE_FUNC_IMPLEMENT
  187. }
  188. };
  189. /**
  190. * hb_unicode_funcs_get_empty:
  191. *
  192. * Fetches the singleton empty Unicode-functions structure.
  193. *
  194. * Return value: (transfer full): The empty Unicode-functions structure
  195. *
  196. * Since: 0.9.2
  197. **/
  198. hb_unicode_funcs_t *
  199. hb_unicode_funcs_get_empty ()
  200. {
  201. return const_cast<hb_unicode_funcs_t *> (&Null (hb_unicode_funcs_t));
  202. }
  203. /**
  204. * hb_unicode_funcs_reference: (skip)
  205. * @ufuncs: The Unicode-functions structure
  206. *
  207. * Increases the reference count on a Unicode-functions structure.
  208. *
  209. * Return value: (transfer full): The Unicode-functions structure
  210. *
  211. * Since: 0.9.2
  212. **/
  213. hb_unicode_funcs_t *
  214. hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs)
  215. {
  216. return hb_object_reference (ufuncs);
  217. }
  218. /**
  219. * hb_unicode_funcs_destroy: (skip)
  220. * @ufuncs: The Unicode-functions structure
  221. *
  222. * Decreases the reference count on a Unicode-functions structure. When
  223. * the reference count reaches zero, the Unicode-functions structure is
  224. * destroyed, freeing all memory.
  225. *
  226. * Since: 0.9.2
  227. **/
  228. void
  229. hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs)
  230. {
  231. if (!hb_object_destroy (ufuncs)) return;
  232. #define HB_UNICODE_FUNC_IMPLEMENT(name) \
  233. if (ufuncs->destroy.name) ufuncs->destroy.name (ufuncs->user_data.name);
  234. HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
  235. #undef HB_UNICODE_FUNC_IMPLEMENT
  236. hb_unicode_funcs_destroy (ufuncs->parent);
  237. hb_free (ufuncs);
  238. }
  239. /**
  240. * hb_unicode_funcs_set_user_data: (skip)
  241. * @ufuncs: The Unicode-functions structure
  242. * @key: The user-data key
  243. * @data: A pointer to the user data
  244. * @destroy: (nullable): A callback to call when @data is not needed anymore
  245. * @replace: Whether to replace an existing data with the same key
  246. *
  247. * Attaches a user-data key/data pair to the specified Unicode-functions structure.
  248. *
  249. * Return value: `true` if success, `false` otherwise
  250. *
  251. * Since: 0.9.2
  252. **/
  253. hb_bool_t
  254. hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
  255. hb_user_data_key_t *key,
  256. void * data,
  257. hb_destroy_func_t destroy,
  258. hb_bool_t replace)
  259. {
  260. return hb_object_set_user_data (ufuncs, key, data, destroy, replace);
  261. }
  262. /**
  263. * hb_unicode_funcs_get_user_data: (skip)
  264. * @ufuncs: The Unicode-functions structure
  265. * @key: The user-data key to query
  266. *
  267. * Fetches the user-data associated with the specified key,
  268. * attached to the specified Unicode-functions structure.
  269. *
  270. * Return value: (transfer none): A pointer to the user data
  271. *
  272. * Since: 0.9.2
  273. **/
  274. void *
  275. hb_unicode_funcs_get_user_data (const hb_unicode_funcs_t *ufuncs,
  276. hb_user_data_key_t *key)
  277. {
  278. return hb_object_get_user_data (ufuncs, key);
  279. }
  280. /**
  281. * hb_unicode_funcs_make_immutable:
  282. * @ufuncs: The Unicode-functions structure
  283. *
  284. * Makes the specified Unicode-functions structure
  285. * immutable.
  286. *
  287. * Since: 0.9.2
  288. **/
  289. void
  290. hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs)
  291. {
  292. if (hb_object_is_immutable (ufuncs))
  293. return;
  294. hb_object_make_immutable (ufuncs);
  295. }
  296. /**
  297. * hb_unicode_funcs_is_immutable:
  298. * @ufuncs: The Unicode-functions structure
  299. *
  300. * Tests whether the specified Unicode-functions structure
  301. * is immutable.
  302. *
  303. * Return value: `true` if @ufuncs is immutable, `false` otherwise
  304. *
  305. * Since: 0.9.2
  306. **/
  307. hb_bool_t
  308. hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs)
  309. {
  310. return hb_object_is_immutable (ufuncs);
  311. }
  312. /**
  313. * hb_unicode_funcs_get_parent:
  314. * @ufuncs: The Unicode-functions structure
  315. *
  316. * Fetches the parent of the Unicode-functions structure
  317. * @ufuncs.
  318. *
  319. * Return value: The parent Unicode-functions structure
  320. *
  321. * Since: 0.9.2
  322. **/
  323. hb_unicode_funcs_t *
  324. hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs)
  325. {
  326. return ufuncs->parent ? ufuncs->parent : hb_unicode_funcs_get_empty ();
  327. }
  328. #define HB_UNICODE_FUNC_IMPLEMENT(name) \
  329. \
  330. void \
  331. hb_unicode_funcs_set_##name##_func (hb_unicode_funcs_t *ufuncs, \
  332. hb_unicode_##name##_func_t func, \
  333. void *user_data, \
  334. hb_destroy_func_t destroy) \
  335. { \
  336. if (hb_object_is_immutable (ufuncs)) \
  337. goto fail; \
  338. \
  339. if (!func) \
  340. { \
  341. if (destroy) \
  342. destroy (user_data); \
  343. destroy = nullptr; \
  344. user_data = ufuncs->parent->user_data.name; \
  345. } \
  346. \
  347. if (ufuncs->destroy.name) \
  348. ufuncs->destroy.name (ufuncs->user_data.name); \
  349. \
  350. if (func) \
  351. ufuncs->func.name = func; \
  352. else \
  353. ufuncs->func.name = ufuncs->parent->func.name; \
  354. ufuncs->user_data.name = user_data; \
  355. ufuncs->destroy.name = destroy; \
  356. return; \
  357. \
  358. fail: \
  359. if (destroy) \
  360. destroy (user_data); \
  361. }
  362. HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
  363. #undef HB_UNICODE_FUNC_IMPLEMENT
  364. #define HB_UNICODE_FUNC_IMPLEMENT(return_type, name) \
  365. \
  366. return_type \
  367. hb_unicode_##name (hb_unicode_funcs_t *ufuncs, \
  368. hb_codepoint_t unicode) \
  369. { \
  370. return ufuncs->name (unicode); \
  371. }
  372. HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
  373. #undef HB_UNICODE_FUNC_IMPLEMENT
  374. /**
  375. * hb_unicode_compose:
  376. * @ufuncs: The Unicode-functions structure
  377. * @a: The first Unicode code point to compose
  378. * @b: The second Unicode code point to compose
  379. * @ab: (out): The composition of @a, @b
  380. *
  381. * Fetches the composition of a sequence of two Unicode
  382. * code points.
  383. *
  384. * Calls the composition function of the specified
  385. * Unicode-functions structure @ufuncs.
  386. *
  387. * Return value: `true` if @a and @b composed, `false` otherwise
  388. *
  389. * Since: 0.9.2
  390. **/
  391. hb_bool_t
  392. hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
  393. hb_codepoint_t a,
  394. hb_codepoint_t b,
  395. hb_codepoint_t *ab)
  396. {
  397. return ufuncs->compose (a, b, ab);
  398. }
  399. /**
  400. * hb_unicode_decompose:
  401. * @ufuncs: The Unicode-functions structure
  402. * @ab: Unicode code point to decompose
  403. * @a: (out): The first code point of the decomposition of @ab
  404. * @b: (out): The second code point of the decomposition of @ab
  405. *
  406. * Fetches the decomposition of a Unicode code point.
  407. *
  408. * Calls the decomposition function of the specified
  409. * Unicode-functions structure @ufuncs.
  410. *
  411. * Return value: `true` if @ab was decomposed, `false` otherwise
  412. *
  413. * Since: 0.9.2
  414. **/
  415. hb_bool_t
  416. hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
  417. hb_codepoint_t ab,
  418. hb_codepoint_t *a,
  419. hb_codepoint_t *b)
  420. {
  421. return ufuncs->decompose (ab, a, b);
  422. }
  423. #ifndef HB_DISABLE_DEPRECATED
  424. /**
  425. * hb_unicode_decompose_compatibility:
  426. * @ufuncs: The Unicode-functions structure
  427. * @u: Code point to decompose
  428. * @decomposed: (out): Compatibility decomposition of @u
  429. *
  430. * Fetches the compatibility decomposition of a Unicode
  431. * code point. Deprecated.
  432. *
  433. * Return value: length of @decomposed.
  434. *
  435. * Since: 0.9.2
  436. * Deprecated: 2.0.0
  437. **/
  438. unsigned int
  439. hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
  440. hb_codepoint_t u,
  441. hb_codepoint_t *decomposed)
  442. {
  443. return ufuncs->decompose_compatibility (u, decomposed);
  444. }
  445. #endif
  446. #ifndef HB_NO_OT_SHAPE
  447. /* See hb-unicode.hh for details. */
  448. const uint8_t
  449. _hb_modified_combining_class[256] =
  450. {
  451. 0, /* HB_UNICODE_COMBINING_CLASS_NOT_REORDERED */
  452. 1, /* HB_UNICODE_COMBINING_CLASS_OVERLAY */
  453. 2, 3, 4, 5, 6,
  454. 7, /* HB_UNICODE_COMBINING_CLASS_NUKTA */
  455. 8, /* HB_UNICODE_COMBINING_CLASS_KANA_VOICING */
  456. 9, /* HB_UNICODE_COMBINING_CLASS_VIRAMA */
  457. /* Hebrew */
  458. HB_MODIFIED_COMBINING_CLASS_CCC10,
  459. HB_MODIFIED_COMBINING_CLASS_CCC11,
  460. HB_MODIFIED_COMBINING_CLASS_CCC12,
  461. HB_MODIFIED_COMBINING_CLASS_CCC13,
  462. HB_MODIFIED_COMBINING_CLASS_CCC14,
  463. HB_MODIFIED_COMBINING_CLASS_CCC15,
  464. HB_MODIFIED_COMBINING_CLASS_CCC16,
  465. HB_MODIFIED_COMBINING_CLASS_CCC17,
  466. HB_MODIFIED_COMBINING_CLASS_CCC18,
  467. HB_MODIFIED_COMBINING_CLASS_CCC19,
  468. HB_MODIFIED_COMBINING_CLASS_CCC20,
  469. HB_MODIFIED_COMBINING_CLASS_CCC21,
  470. HB_MODIFIED_COMBINING_CLASS_CCC22,
  471. HB_MODIFIED_COMBINING_CLASS_CCC23,
  472. HB_MODIFIED_COMBINING_CLASS_CCC24,
  473. HB_MODIFIED_COMBINING_CLASS_CCC25,
  474. HB_MODIFIED_COMBINING_CLASS_CCC26,
  475. /* Arabic */
  476. HB_MODIFIED_COMBINING_CLASS_CCC27,
  477. HB_MODIFIED_COMBINING_CLASS_CCC28,
  478. HB_MODIFIED_COMBINING_CLASS_CCC29,
  479. HB_MODIFIED_COMBINING_CLASS_CCC30,
  480. HB_MODIFIED_COMBINING_CLASS_CCC31,
  481. HB_MODIFIED_COMBINING_CLASS_CCC32,
  482. HB_MODIFIED_COMBINING_CLASS_CCC33,
  483. HB_MODIFIED_COMBINING_CLASS_CCC34,
  484. HB_MODIFIED_COMBINING_CLASS_CCC35,
  485. /* Syriac */
  486. HB_MODIFIED_COMBINING_CLASS_CCC36,
  487. 37, 38, 39,
  488. 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  489. 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  490. 80, 81, 82, 83,
  491. /* Telugu */
  492. HB_MODIFIED_COMBINING_CLASS_CCC84,
  493. 85, 86, 87, 88, 89, 90,
  494. HB_MODIFIED_COMBINING_CLASS_CCC91,
  495. 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
  496. /* Thai */
  497. HB_MODIFIED_COMBINING_CLASS_CCC103,
  498. 104, 105, 106,
  499. HB_MODIFIED_COMBINING_CLASS_CCC107,
  500. 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
  501. /* Lao */
  502. HB_MODIFIED_COMBINING_CLASS_CCC118,
  503. 119, 120, 121,
  504. HB_MODIFIED_COMBINING_CLASS_CCC122,
  505. 123, 124, 125, 126, 127, 128,
  506. /* Tibetan */
  507. HB_MODIFIED_COMBINING_CLASS_CCC129,
  508. HB_MODIFIED_COMBINING_CLASS_CCC130,
  509. 131,
  510. HB_MODIFIED_COMBINING_CLASS_CCC132,
  511. 133, 134, 135, 136, 137, 138, 139,
  512. 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
  513. 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  514. 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
  515. 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
  516. 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
  517. 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
  518. 200, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT */
  519. 201,
  520. 202, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW */
  521. 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
  522. 214, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE */
  523. 215,
  524. 216, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT */
  525. 217,
  526. 218, /* HB_UNICODE_COMBINING_CLASS_BELOW_LEFT */
  527. 219,
  528. 220, /* HB_UNICODE_COMBINING_CLASS_BELOW */
  529. 221,
  530. 222, /* HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT */
  531. 223,
  532. 224, /* HB_UNICODE_COMBINING_CLASS_LEFT */
  533. 225,
  534. 226, /* HB_UNICODE_COMBINING_CLASS_RIGHT */
  535. 227,
  536. 228, /* HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT */
  537. 229,
  538. 230, /* HB_UNICODE_COMBINING_CLASS_ABOVE */
  539. 231,
  540. 232, /* HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT */
  541. 233, /* HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW */
  542. 234, /* HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE */
  543. 235, 236, 237, 238, 239,
  544. 240, /* HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT */
  545. 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
  546. 255, /* HB_UNICODE_COMBINING_CLASS_INVALID */
  547. };
  548. #endif
  549. /*
  550. * Emoji
  551. */
  552. #ifndef HB_NO_EMOJI_SEQUENCES
  553. #include "hb-unicode-emoji-table.hh"
  554. bool
  555. _hb_unicode_is_emoji_Extended_Pictographic (hb_codepoint_t cp)
  556. {
  557. return _hb_emoji_is_Extended_Pictographic (cp);
  558. }
  559. #endif