From 65988a145b4a52c37fd53c1473034f9e701f61d9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 24 Jun 2011 19:05:52 -0400 Subject: [PATCH] [Indic] Add a table of consonant positions Copied form HarfBuzz.old Indic data. These are below and post consonants. This is temporary. Read the comment in the patch. --- src/hb-ot-shape-complex-indic.cc | 106 +++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 35412604b..a6edf85cd 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -123,6 +123,112 @@ enum indic_matra_category_t { #include "hb-ot-shape-complex-indic-table.hh" +/* XXX + * This is a hack for now. We should: + * 1. Move this data into the main Indic table, + * and/or + * 2. Probe font lookups to determine consonant positions. + */ +static const struct { + hb_codepoint_t u; + indic_matra_category_t position; +} consonant_positions[] = { + {0x0930, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x09AC, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x09AF, INDIC_MATRA_CATEGORY_RIGHT}, + {0x09B0, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x09F0, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0A2F, INDIC_MATRA_CATEGORY_RIGHT}, + {0x0A30, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0A35, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0A39, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0AB0, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B24, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B28, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B2C, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B2D, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B2E, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B2F, INDIC_MATRA_CATEGORY_RIGHT}, + {0x0B30, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B32, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B33, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0B5F, INDIC_MATRA_CATEGORY_RIGHT}, + {0x0B71, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C15, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C16, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C17, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C18, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C19, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1A, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1B, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1C, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1D, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1E, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C1F, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C20, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C21, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C22, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C23, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C24, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C25, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C26, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C27, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C28, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2A, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2B, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2C, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2D, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2E, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C2F, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C30, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C32, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C33, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C35, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C36, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C37, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C38, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C39, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C95, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C96, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C97, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C98, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C99, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9A, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9B, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9C, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9D, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9E, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0C9F, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA0, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA1, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA2, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA3, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA4, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA5, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA6, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA7, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CA8, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAA, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAB, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAC, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAD, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAE, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CAF, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB0, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB2, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB3, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB5, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB6, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB7, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB8, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CB9, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0CDE, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0D2F, INDIC_MATRA_CATEGORY_RIGHT}, + {0x0D30, INDIC_MATRA_CATEGORY_RIGHT}, + {0x0D32, INDIC_MATRA_CATEGORY_BOTTOM}, + {0x0D35, INDIC_MATRA_CATEGORY_RIGHT}, +}; + static const struct { hb_tag_t tag;