2009-08-11 02:05:16 +02:00
|
|
|
/*
|
2011-04-21 23:14:28 +02:00
|
|
|
* Copyright © 2009 Red Hat, Inc.
|
2011-04-29 18:00:38 +02:00
|
|
|
* Copyright © 2011 Codethink Limited
|
2012-08-02 00:07:42 +02:00
|
|
|
* Copyright © 2010,2011,2012 Google, Inc.
|
2009-08-11 02:05:16 +02:00
|
|
|
*
|
2010-04-22 06:11:43 +02:00
|
|
|
* This is part of HarfBuzz, a text shaping library.
|
2009-08-11 02:05:16 +02:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, without written agreement and without
|
|
|
|
* license or royalty fees, to use, copy, modify, and distribute this
|
|
|
|
* software and its documentation for any purpose, provided that the
|
|
|
|
* above copyright notice and the following two paragraphs appear in
|
|
|
|
* all copies of this software.
|
|
|
|
*
|
|
|
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
|
|
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
|
|
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
|
|
* DAMAGE.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
|
|
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
|
|
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
|
|
*
|
|
|
|
* Red Hat Author(s): Behdad Esfahbod
|
2011-04-20 06:19:20 +02:00
|
|
|
* Codethink Author(s): Ryan Lortie
|
2011-04-20 08:00:47 +02:00
|
|
|
* Google Author(s): Behdad Esfahbod
|
2009-08-11 02:05:16 +02:00
|
|
|
*/
|
|
|
|
|
2011-04-20 08:00:47 +02:00
|
|
|
#ifndef HB_UNICODE_PRIVATE_HH
|
|
|
|
#define HB_UNICODE_PRIVATE_HH
|
2009-08-11 02:05:16 +02:00
|
|
|
|
2011-04-21 00:50:27 +02:00
|
|
|
#include "hb-private.hh"
|
2011-04-22 00:24:02 +02:00
|
|
|
#include "hb-object-private.hh"
|
2009-08-11 02:05:16 +02:00
|
|
|
|
|
|
|
|
2012-08-02 00:07:42 +02:00
|
|
|
extern HB_INTERNAL const uint8_t _hb_modified_combining_class[256];
|
2010-07-23 21:11:18 +02:00
|
|
|
|
2009-08-11 02:05:16 +02:00
|
|
|
/*
|
|
|
|
* hb_unicode_funcs_t
|
|
|
|
*/
|
|
|
|
|
2011-07-08 05:14:42 +02:00
|
|
|
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \
|
2011-07-08 05:19:27 +02:00
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (combining_class) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (general_category) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (mirroring) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (script) \
|
2011-07-08 05:47:19 +02:00
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (compose) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (decompose) \
|
2012-08-01 03:36:16 +02:00
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \
|
2011-07-08 05:14:42 +02:00
|
|
|
/* ^--- Add new callbacks here */
|
|
|
|
|
2011-07-08 05:19:27 +02:00
|
|
|
/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
|
|
|
|
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
|
2012-08-01 22:23:44 +02:00
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \
|
2011-07-08 05:19:27 +02:00
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
|
|
|
|
HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \
|
|
|
|
/* ^--- Add new simple callbacks here */
|
|
|
|
|
2012-06-16 21:21:55 +02:00
|
|
|
struct hb_unicode_funcs_t {
|
2011-04-22 00:24:02 +02:00
|
|
|
hb_object_header_t header;
|
2012-06-06 09:30:09 +02:00
|
|
|
ASSERT_POD ();
|
2011-04-22 00:24:02 +02:00
|
|
|
|
2011-04-20 06:19:20 +02:00
|
|
|
hb_unicode_funcs_t *parent;
|
2009-08-11 02:05:16 +02:00
|
|
|
|
2011-04-22 00:24:02 +02:00
|
|
|
bool immutable;
|
2009-08-11 05:25:28 +02:00
|
|
|
|
2012-08-01 23:01:59 +02:00
|
|
|
#define HB_UNICODE_FUNC_IMPLEMENT(return_type, name) \
|
|
|
|
inline return_type name (hb_codepoint_t unicode) { return func.name (this, unicode, user_data.name); }
|
|
|
|
HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
|
|
|
|
#undef HB_UNICODE_FUNC_IMPLEMENT
|
|
|
|
|
|
|
|
inline hb_bool_t compose (hb_codepoint_t a, hb_codepoint_t b,
|
|
|
|
hb_codepoint_t *ab)
|
|
|
|
{
|
|
|
|
*ab = 0;
|
2012-08-12 03:26:25 +02:00
|
|
|
if (unlikely (!a || !b)) return false;
|
2012-08-07 22:57:02 +02:00
|
|
|
return func.compose (this, a, b, ab, user_data.compose);
|
2012-08-01 23:01:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline hb_bool_t decompose (hb_codepoint_t ab,
|
|
|
|
hb_codepoint_t *a, hb_codepoint_t *b)
|
|
|
|
{
|
2012-08-12 03:26:25 +02:00
|
|
|
*a = ab; *b = 0;
|
2012-08-01 23:01:59 +02:00
|
|
|
return func.decompose (this, ab, a, b, user_data.decompose);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline unsigned int decompose_compatibility (hb_codepoint_t u,
|
|
|
|
hb_codepoint_t *decomposed)
|
|
|
|
{
|
|
|
|
unsigned int ret = func.decompose_compatibility (this, u, decomposed, user_data.decompose_compatibility);
|
|
|
|
if (ret == 1 && u == decomposed[0]) {
|
|
|
|
decomposed[0] = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
decomposed[ret] = 0;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-04-20 08:00:47 +02:00
|
|
|
|
2014-07-16 19:21:26 +02:00
|
|
|
inline unsigned int
|
2012-08-02 00:07:42 +02:00
|
|
|
modified_combining_class (hb_codepoint_t unicode)
|
|
|
|
{
|
2013-02-11 20:27:02 +01:00
|
|
|
/* XXX This hack belongs to the Myanmar shaper. */
|
2014-07-11 20:54:42 +02:00
|
|
|
if (unlikely (unicode == 0x1037u)) unicode = 0x103Au;
|
2013-12-28 01:33:28 +01:00
|
|
|
|
|
|
|
/* XXX This hack belongs to the SEA shaper (for Tai Tham):
|
|
|
|
* Reorder SAKOT to ensure it comes after any tone marks. */
|
2014-07-11 20:54:42 +02:00
|
|
|
if (unlikely (unicode == 0x1A60u)) return 254;
|
2013-02-11 20:27:02 +01:00
|
|
|
|
2014-04-28 21:38:25 +02:00
|
|
|
/* XXX This hack belongs to the Tibetan shaper:
|
|
|
|
* Reorder PADMA to ensure it comes after any vowel marks. */
|
2014-07-11 20:54:42 +02:00
|
|
|
if (unlikely (unicode == 0x0FC6u)) return 254;
|
2014-04-28 21:38:25 +02:00
|
|
|
|
2012-08-02 00:07:42 +02:00
|
|
|
return _hb_modified_combining_class[combining_class (unicode)];
|
|
|
|
}
|
2012-08-01 23:13:10 +02:00
|
|
|
|
2014-07-16 19:21:26 +02:00
|
|
|
static inline hb_bool_t
|
2012-08-01 23:13:10 +02:00
|
|
|
is_variation_selector (hb_codepoint_t unicode)
|
|
|
|
{
|
2014-07-17 20:16:38 +02:00
|
|
|
/* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the
|
|
|
|
* Arabic shaper. No need to match them here. */
|
2014-07-11 20:54:42 +02:00
|
|
|
return unlikely (hb_in_ranges (unicode,
|
|
|
|
0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */
|
|
|
|
0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */
|
2012-08-01 23:13:10 +02:00
|
|
|
}
|
|
|
|
|
2012-10-26 01:32:54 +02:00
|
|
|
/* Default_Ignorable codepoints:
|
2012-08-01 23:13:10 +02:00
|
|
|
*
|
2014-01-20 11:37:32 +01:00
|
|
|
* Note: While U+115F, U+1160, U+3164 and U+FFA0 are Default_Ignorable,
|
|
|
|
* we do NOT want to hide them, as the way Uniscribe has implemented them
|
|
|
|
* is with regular spacing glyphs, and that's the way fonts are made to work.
|
|
|
|
* As such, we make exceptions for those four.
|
2013-03-19 11:59:40 +01:00
|
|
|
*
|
2014-06-18 18:29:23 +02:00
|
|
|
* Unicode 7.0:
|
|
|
|
* $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.txt | sed 's/;.*#/#/'
|
|
|
|
* 00AD # Cf SOFT HYPHEN
|
|
|
|
* 034F # Mn COMBINING GRAPHEME JOINER
|
|
|
|
* 061C # Cf ARABIC LETTER MARK
|
|
|
|
* 115F..1160 # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER
|
|
|
|
* 17B4..17B5 # Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA
|
|
|
|
* 180B..180D # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE
|
|
|
|
* 180E # Cf MONGOLIAN VOWEL SEPARATOR
|
|
|
|
* 200B..200F # Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK
|
|
|
|
* 202A..202E # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE
|
|
|
|
* 2060..2064 # Cf [5] WORD JOINER..INVISIBLE PLUS
|
|
|
|
* 2065 # Cn <reserved-2065>
|
|
|
|
* 2066..206F # Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES
|
|
|
|
* 3164 # Lo HANGUL FILLER
|
|
|
|
* FE00..FE0F # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
|
|
|
|
* FEFF # Cf ZERO WIDTH NO-BREAK SPACE
|
|
|
|
* FFA0 # Lo HALFWIDTH HANGUL FILLER
|
|
|
|
* FFF0..FFF8 # Cn [9] <reserved-FFF0>..<reserved-FFF8>
|
|
|
|
* 1BCA0..1BCA3 # Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP
|
|
|
|
* 1D173..1D17A # Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE
|
|
|
|
* E0000 # Cn <reserved-E0000>
|
|
|
|
* E0001 # Cf LANGUAGE TAG
|
|
|
|
* E0002..E001F # Cn [30] <reserved-E0002>..<reserved-E001F>
|
|
|
|
* E0020..E007F # Cf [96] TAG SPACE..CANCEL TAG
|
|
|
|
* E0080..E00FF # Cn [128] <reserved-E0080>..<reserved-E00FF>
|
|
|
|
* E0100..E01EF # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256
|
|
|
|
* E01F0..E0FFF # Cn [3600] <reserved-E01F0>..<reserved-E0FFF>
|
2012-08-01 23:13:10 +02:00
|
|
|
*/
|
2014-07-16 19:21:26 +02:00
|
|
|
static inline hb_bool_t
|
2012-10-26 01:32:54 +02:00
|
|
|
is_default_ignorable (hb_codepoint_t ch)
|
2012-08-01 23:13:10 +02:00
|
|
|
{
|
2012-10-26 01:32:54 +02:00
|
|
|
hb_codepoint_t plane = ch >> 16;
|
|
|
|
if (likely (plane == 0))
|
|
|
|
{
|
|
|
|
/* BMP */
|
|
|
|
hb_codepoint_t page = ch >> 8;
|
|
|
|
switch (page) {
|
2014-07-11 20:54:42 +02:00
|
|
|
case 0x00: return unlikely (ch == 0x00ADu);
|
|
|
|
case 0x03: return unlikely (ch == 0x034Fu);
|
|
|
|
case 0x06: return unlikely (ch == 0x061Cu);
|
|
|
|
case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u);
|
|
|
|
case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu);
|
|
|
|
case 0x20: return hb_in_ranges (ch, 0x200Bu, 0x200Fu,
|
|
|
|
0x202Au, 0x202Eu,
|
|
|
|
0x2060u, 0x206Fu);
|
|
|
|
case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu;
|
|
|
|
case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u);
|
2012-10-26 01:32:54 +02:00
|
|
|
default: return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Other planes */
|
|
|
|
switch (plane) {
|
2014-07-11 20:54:42 +02:00
|
|
|
case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u,
|
|
|
|
0x1D173u, 0x1D17Au);
|
|
|
|
case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu);
|
2012-10-26 01:32:54 +02:00
|
|
|
default: return false;
|
|
|
|
}
|
|
|
|
}
|
2012-08-01 23:13:10 +02:00
|
|
|
}
|
|
|
|
|
2015-11-05 02:27:07 +01:00
|
|
|
/* Space estimates based on:
|
|
|
|
* http://www.unicode.org/charts/PDF/U2000.pdf
|
|
|
|
* https://www.microsoft.com/typography/developers/fdsspec/spaces.aspx
|
|
|
|
*/
|
2015-11-04 23:48:46 +01:00
|
|
|
enum space_t {
|
|
|
|
NOT_SPACE = 0,
|
2015-11-05 02:27:07 +01:00
|
|
|
SPACE_EM = 1,
|
|
|
|
SPACE_EM_2 = 2,
|
|
|
|
SPACE_EM_3 = 3,
|
|
|
|
SPACE_EM_4 = 4,
|
|
|
|
SPACE_EM_5 = 5,
|
|
|
|
SPACE_EM_6 = 6,
|
|
|
|
SPACE_EM_16 = 16,
|
|
|
|
SPACE_4_EM_18, /* 4/18th of an EM! */
|
|
|
|
SPACE,
|
2015-11-04 23:48:46 +01:00
|
|
|
SPACE_FIGURE,
|
|
|
|
SPACE_PUNCTUATION,
|
|
|
|
SPACE_NARROW,
|
|
|
|
};
|
|
|
|
static inline space_t
|
|
|
|
space_fallback_type (hb_codepoint_t u)
|
|
|
|
{
|
|
|
|
switch (u)
|
|
|
|
{
|
|
|
|
/* All GC=Zs chars that can use a fallback. */
|
2015-11-05 02:27:07 +01:00
|
|
|
default: return NOT_SPACE; /* Shouldn't happen. */
|
|
|
|
case 0x0020u: return SPACE; /* U+0020 SPACE */
|
|
|
|
case 0x00A0u: return SPACE; /* U+00A0 NO-BREAK SPACE */
|
|
|
|
case 0x2000u: return SPACE_EM_2; /* U+2000 EN QUAD */
|
|
|
|
case 0x2001u: return SPACE_EM; /* U+2001 EM QUAD */
|
|
|
|
case 0x2002u: return SPACE_EM_2; /* U+2002 EN SPACE */
|
|
|
|
case 0x2003u: return SPACE_EM; /* U+2003 EM SPACE */
|
|
|
|
case 0x2004u: return SPACE_EM_3; /* U+2004 THREE-PER-EM SPACE */
|
|
|
|
case 0x2005u: return SPACE_EM_4; /* U+2005 FOUR-PER-EM SPACE */
|
|
|
|
case 0x2006u: return SPACE_EM_6; /* U+2006 SIX-PER-EM SPACE */
|
|
|
|
case 0x2007u: return SPACE_FIGURE; /* U+2007 FIGURE SPACE */
|
|
|
|
case 0x2008u: return SPACE_PUNCTUATION; /* U+2008 PUNCTUATION SPACE */
|
|
|
|
case 0x2009u: return SPACE_EM_5; /* U+2009 THIN SPACE */
|
|
|
|
case 0x200Au: return SPACE_EM_16; /* U+200A HAIR SPACE */
|
|
|
|
case 0x202Fu: return SPACE_NARROW; /* U+202F NARROW NO-BREAK SPACE */
|
|
|
|
case 0x205Fu: return SPACE_4_EM_18; /* U+205F MEDIUM MATHEMATICAL SPACE */
|
|
|
|
case 0x3000u: return SPACE_EM; /* U+3000 IDEOGRAPHIC SPACE */
|
2015-11-04 23:48:46 +01:00
|
|
|
}
|
|
|
|
}
|
2012-08-01 23:13:10 +02:00
|
|
|
|
2011-04-20 08:00:47 +02:00
|
|
|
struct {
|
2011-07-08 05:47:19 +02:00
|
|
|
#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name;
|
2011-07-08 05:14:42 +02:00
|
|
|
HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
|
|
|
|
#undef HB_UNICODE_FUNC_IMPLEMENT
|
2011-07-08 05:47:19 +02:00
|
|
|
} func;
|
2011-04-20 08:00:47 +02:00
|
|
|
|
|
|
|
struct {
|
2011-07-08 05:19:27 +02:00
|
|
|
#define HB_UNICODE_FUNC_IMPLEMENT(name) void *name;
|
2011-07-08 05:14:42 +02:00
|
|
|
HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
|
|
|
|
#undef HB_UNICODE_FUNC_IMPLEMENT
|
2011-04-20 08:00:47 +02:00
|
|
|
} user_data;
|
|
|
|
|
2010-05-24 18:46:21 +02:00
|
|
|
struct {
|
2011-07-08 05:19:27 +02:00
|
|
|
#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
|
2011-07-08 05:14:42 +02:00
|
|
|
HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
|
|
|
|
#undef HB_UNICODE_FUNC_IMPLEMENT
|
2011-04-20 08:00:47 +02:00
|
|
|
} destroy;
|
2009-08-11 02:05:16 +02:00
|
|
|
};
|
|
|
|
|
2011-04-27 15:24:37 +02:00
|
|
|
|
2012-07-11 22:35:04 +02:00
|
|
|
extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
|
2011-04-27 15:24:37 +02:00
|
|
|
|
2009-08-11 05:21:33 +02:00
|
|
|
|
2012-08-08 07:20:45 +02:00
|
|
|
/* Modified combining marks */
|
|
|
|
|
|
|
|
/* Hebrew
|
|
|
|
*
|
|
|
|
* We permute the "fixed-position" classes 10-26 into the order
|
|
|
|
* described in the SBL Hebrew manual:
|
|
|
|
*
|
|
|
|
* http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
|
|
|
|
*
|
|
|
|
* (as recommended by:
|
|
|
|
* http://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering-t6751.0.html)
|
|
|
|
*
|
|
|
|
* More details here:
|
|
|
|
* https://bugzilla.mozilla.org/show_bug.cgi?id=662055
|
|
|
|
*/
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC10 22 /* sheva */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC11 15 /* hataf segol */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC12 16 /* hataf patah */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC13 17 /* hataf qamats */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC14 23 /* hiriq */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC15 18 /* tsere */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC16 19 /* segol */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC17 20 /* patah */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC18 21 /* qamats */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC19 14 /* holam */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC20 24 /* qubuts */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC21 12 /* dagesh */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC22 25 /* meteg */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC23 13 /* rafe */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC24 10 /* shin dot */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC25 11 /* sin dot */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC26 26 /* point varika */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Arabic
|
|
|
|
*
|
|
|
|
* Modify to move Shadda (ccc=33) before other marks. See:
|
|
|
|
* http://unicode.org/faq/normalization.html#8
|
|
|
|
* http://unicode.org/faq/normalization.html#9
|
|
|
|
*/
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC27 28 /* fathatan */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC28 29 /* dammatan */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC29 30 /* kasratan */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC30 31 /* fatha */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC31 32 /* damma */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC32 33 /* kasra */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC33 27 /* shadda */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC34 34 /* sukun */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC35 35 /* superscript alef */
|
|
|
|
|
|
|
|
/* Syriac */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC36 36 /* superscript alaph */
|
|
|
|
|
|
|
|
/* Telugu
|
|
|
|
*
|
|
|
|
* Modify Telugu length marks (ccc=84, ccc=91).
|
|
|
|
* These are the only matras in the main Indic scripts range that have
|
|
|
|
* a non-zero ccc. That makes them reorder with the Halant that is
|
|
|
|
* ccc=9. Just zero them, we don't need them in our Indic shaper.
|
|
|
|
*/
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC84 0 /* length mark */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC91 0 /* ai length mark */
|
|
|
|
|
|
|
|
/* Thai
|
|
|
|
*
|
2012-08-10 03:12:30 +02:00
|
|
|
* Modify U+0E38 and U+0E39 (ccc=103) to be reordered before U+0E3A (ccc=9).
|
|
|
|
* Assign 3, which is unassigned otherwise.
|
|
|
|
* Uniscribe does this reordering too.
|
2012-08-08 07:20:45 +02:00
|
|
|
*/
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC103 3 /* sara u / sara uu */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC107 107 /* mai * */
|
|
|
|
|
|
|
|
/* Lao */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC118 118 /* sign u / sign uu */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */
|
|
|
|
|
|
|
|
/* Tibetan */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */
|
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */
|
2012-08-10 03:12:30 +02:00
|
|
|
#define HB_MODIFIED_COMBINING_CLASS_CCC132 132 /* sign u */
|
2012-08-08 07:20:45 +02:00
|
|
|
|
|
|
|
|
2012-09-06 20:25:48 +02:00
|
|
|
/* Misc */
|
|
|
|
|
|
|
|
#define HB_UNICODE_GENERAL_CATEGORY_IS_MARK(gen_cat) \
|
2015-07-21 16:50:02 +02:00
|
|
|
(FLAG_SAFE (gen_cat) & \
|
2012-09-06 20:25:48 +02:00
|
|
|
(FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \
|
|
|
|
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \
|
|
|
|
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
|
|
|
|
|
2015-11-03 21:58:12 +01:00
|
|
|
#define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK(gen_cat) \
|
|
|
|
(FLAG_SAFE (gen_cat) & \
|
|
|
|
(FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \
|
|
|
|
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
|
|
|
|
|
2011-04-20 08:00:47 +02:00
|
|
|
#endif /* HB_UNICODE_PRIVATE_HH */
|