gfx/harfbuzz/src/indic.cc

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/harfbuzz/src/indic.cc	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/*
     1.5 + * Copyright © 2012  Google, Inc.
     1.6 + *
     1.7 + *  This is part of HarfBuzz, a text shaping library.
     1.8 + *
     1.9 + * Permission is hereby granted, without written agreement and without
    1.10 + * license or royalty fees, to use, copy, modify, and distribute this
    1.11 + * software and its documentation for any purpose, provided that the
    1.12 + * above copyright notice and the following two paragraphs appear in
    1.13 + * all copies of this software.
    1.14 + *
    1.15 + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
    1.16 + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
    1.17 + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
    1.18 + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
    1.19 + * DAMAGE.
    1.20 + *
    1.21 + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
    1.22 + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
    1.23 + * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
    1.24 + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
    1.25 + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
    1.26 + *
    1.27 + * Google Author(s): Behdad Esfahbod
    1.28 + */
    1.29 +
    1.30 +#include "hb-ot-shape-complex-indic-private.hh"
    1.31 +
    1.32 +int
    1.33 +main (void)
    1.34 +{
    1.35 +  hb_unicode_funcs_t *funcs = hb_unicode_funcs_get_default ();
    1.36 +
    1.37 +  printf ("There are split matras without a Unicode decomposition:\n");
    1.38 +  for (hb_codepoint_t u = 0; u < 0x110000; u++)
    1.39 +  {
    1.40 +    unsigned int type = get_indic_categories (u);
    1.41 +
    1.42 +    unsigned int category = type & 0x0F;
    1.43 +    unsigned int position = type >> 4;
    1.44 +
    1.45 +    hb_unicode_general_category_t cat = hb_unicode_general_category (funcs, u);
    1.46 +    unsigned int ccc = hb_unicode_combining_class (funcs, u);
    1.47 +    if (category == OT_M && ccc)
    1.48 +      printf ("U+%04X %d\n", u, ccc);
    1.49 +
    1.50 +//    hb_codepoint_t a, b;
    1.51 +//    if (!hb_unicode_decompose (funcs, u, &a, &b))
    1.52 +//      printf ("U+%04X %x %x\n", u, category, position);
    1.53 +  }
    1.54 +}

mercurial