13ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* 23ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * Copyright © 2012 Google, Inc. 33ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * 43ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * This is part of HarfBuzz, a text shaping library. 53ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * 63ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * Permission is hereby granted, without written agreement and without 73ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * license or royalty fees, to use, copy, modify, and distribute this 83ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * software and its documentation for any purpose, provided that the 93ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * above copyright notice and the following two paragraphs appear in 103ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * all copies of this software. 113ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * 123ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 133ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 143ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 153ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 163ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * DAMAGE. 173ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * 183ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 193ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 203ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 213ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 223ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 233ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * 243ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * Google Author(s): Behdad Esfahbod 253ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod */ 263ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 273ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH 283ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH 293ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 303ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#include "hb-private.hh" 313ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 323ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 333ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#include "hb-ot-shape-complex-private.hh" 343eb6f81fd3f1e56679eec10d08f5e2303121753fBehdad Esfahbod#include "hb-ot-shape-private.hh" /* XXX Remove */ 353ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 363ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 37dba186711e3f5e723f917b7104e849c4c525d3b8Behdad Esfahbod#define INDIC_TABLE_ELEMENT_TYPE uint16_t 383ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 393ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* Cateories used in the OpenType spec: 403ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx 413ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod */ 423ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* Note: This enum is duplicated in the -machine.rl source file. 433ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * Not sure how to avoid duplication. */ 443ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbodenum indic_category_t { 453ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod OT_X = 0, 46c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_C = 1, 47c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_V = 2, 48c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_N = 3, 49c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_H = 4, 50c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_ZWNJ = 5, 51c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_ZWJ = 6, 52c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_M = 7, 53c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_SM = 8, 54c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_VD = 9, 55c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_A = 10, 56cf78dd483cbe1759a8ecb731879e041a53ba9bb3Behdad Esfahbod OT_PLACEHOLDER = 11, 57c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_DOTTEDCIRCLE = 12, 58c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_RS = 13, /* Register Shifter, used in Khmer OT spec. */ 59c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_Coeng = 14, /* Khmer-style Virama. */ 60c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_Repha = 15, /* Atomically-encoded logical or visual repha. */ 61c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_Ra = 16, 62c16012e9019ec59c2200a3cc29b8a37ea70eda70Behdad Esfahbod OT_CM = 17, /* Consonant-Medial. */ 639f9bd9bf31161660214b8b39a78cdafbb79db1beBehdad Esfahbod OT_Symbol = 18, /* Avagraha, etc that take marks (SM,A,VD). */ 646e613f3365bf4e9fd778758c53e7de00c64beca1Behdad Esfahbod OT_CM2 = 31 /* Consonant-Medial, second slot. */ 653ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod}; 663ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 67cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2)) 68cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod 69cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod/* Note: 70cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod * 71cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels 72cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod * cannot happen in a consonant syllable. The plus side however is, we can call the 73cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod * consonant syllable logic from the vowel syllable function and get it all right! */ 74cf78dd483cbe1759a8ecb731879e041a53ba9bb3Behdad Esfahbod#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_PLACEHOLDER) | FLAG (OT_DOTTEDCIRCLE)) 75cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) 76cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng)) 77cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod 78cf71d28c380819cb0f7f0f22f6ff9e4aa881a2b8Behdad Esfahbod 793ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* Visual positions in a syllable from left to right. */ 803ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbodenum indic_position_t { 8181202bd860e4034c18d9f80c5a4f33d9f48463a3Behdad Esfahbod POS_START, 8281202bd860e4034c18d9f80c5a4f33d9f48463a3Behdad Esfahbod 833d25079f8d6be81b9b4b91d3a97016b8a572f571Behdad Esfahbod POS_RA_TO_BECOME_REPH, 846a091df9b403b147ef78f3974610dedf4ce1e08aBehdad Esfahbod POS_PRE_M, 85dbccf87eef0d26838fa4bb3ae26410f6c4818836Behdad Esfahbod POS_PRE_C, 86be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod 87dbccf87eef0d26838fa4bb3ae26410f6c4818836Behdad Esfahbod POS_BASE_C, 88be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_AFTER_MAIN, 89be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod 90dbccf87eef0d26838fa4bb3ae26410f6c4818836Behdad Esfahbod POS_ABOVE_C, 91be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod 92be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_BEFORE_SUB, 93dbccf87eef0d26838fa4bb3ae26410f6c4818836Behdad Esfahbod POS_BELOW_C, 94be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_AFTER_SUB, 95be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod 96be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_BEFORE_POST, 97dbccf87eef0d26838fa4bb3ae26410f6c4818836Behdad Esfahbod POS_POST_C, 98be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_AFTER_POST, 99be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod 10055f70ebfb95083f515d9b0044a2a65ab11484bb5Behdad Esfahbod POS_FINAL_C, 101be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_SMVD, 10281202bd860e4034c18d9f80c5a4f33d9f48463a3Behdad Esfahbod 103be8b9f5f715f6fb36b98bd33c3303f79cc068f8aBehdad Esfahbod POS_END 1043ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod}; 1053ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 106c5306b6861cfaa50af40e8ceb058791fa06d7981Behdad Esfahbod/* Categories used in IndicSyllabicCategory.txt from UCD. */ 1073ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbodenum indic_syllabic_category_t { 1085c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_OTHER = OT_X, 1095c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod 1105c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_Symbol, 1115c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM, 112d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_BRAHMI_JOINING_NUMBER = OT_PLACEHOLDER, /* TODO */ 113d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CANTILLATION_MARK = OT_A, 1145c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C, 1155c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C, 1165c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_CM, 1175c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C, 1185c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_CM, 1195c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_PLACEHOLDER, 120d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_PRECEDING_REPHA = OT_Repha, 1215c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_CM, 122d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA = OT_N, 123d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK = OT_SM, 124d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_INVISIBLE_STACKER = OT_H, /* TODO */ 125d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_JOINER = OT_ZWJ, 1265c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X, 127d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_NON_JOINER = OT_ZWNJ, 1285c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N, 129d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_NUMBER = OT_PLACEHOLDER, 130d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER = OT_PLACEHOLDER, /* TODO */ 131d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_PURE_KILLER = OT_H, /* TODO */ 1325c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS, 1335c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X, 1345c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N, 1355c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H, 1365c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM, 1375c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V, 1385c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M, 1395c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V 1403ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod}; 1413ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 1423ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* Categories used in IndicSMatraCategory.txt from UCD */ 1433ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbodenum indic_matra_category_t { 1445c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END, 1453ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 1465c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C, 1475c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C, 1485c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C, 1495c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C, 1503ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 151f83aaa3133de5d807be267a100d6a200e8db9017Behdad Esfahbod /* These should resolve to the position of the last part of the split sequence. */ 1525c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, 1535c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, 1545c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM, 1555c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, 1565c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP, 1575c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, 1585c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, 1595c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod 1605c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_OVERSTRUCK = POS_AFTER_MAIN, 1615c4e3e9a57b6b735e7d72cbd5f4070cf024d7015Behdad Esfahbod INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = POS_PRE_M 1623ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod}; 1633ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 1643ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation 1653ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod * because gcc fails to optimize the latter and fills the table in at runtime. */ 1663ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#define INDIC_COMBINE_CATEGORIES(S,M) \ 167d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || \ 168d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod ( \ 169d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL || \ 170d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK || \ 171d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER || \ 172d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA || \ 173d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_VIRAMA || \ 174d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT || \ 175d743ce78e10758b7dbaf0cfd191309e5ef646881Behdad Esfahbod false)) + \ 176dba186711e3f5e723f917b7104e849c4c525d3b8Behdad Esfahbod ASSERT_STATIC_EXPR_ZERO (S < 255 && M < 255) + \ 177dba186711e3f5e723f917b7104e849c4c525d3b8Behdad Esfahbod ((M << 8) | S)) 1783ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 1793a83d33ec0b1be6f5992816ff5ebb0f43c8dff00Behdad EsfahbodHB_INTERNAL INDIC_TABLE_ELEMENT_TYPE 1803a83d33ec0b1be6f5992816ff5ebb0f43c8dff00Behdad Esfahbodhb_indic_get_categories (hb_codepoint_t u); 1813ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod 1823ed4634ec349fa9e943ad23718c04be4dd4bba62Behdad Esfahbod#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */ 183