From 691086f131cb6c9d97e98730c27673484bf93f87 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 May 2016 12:08:18 +0100 Subject: [PATCH] Add Unicode 9 beta scripts These are frozen, so good time to add. --- src/hb-common.cc | 3 +++ src/hb-common.h | 9 +++++++++ src/hb-ot-shape-complex-private.hh | 9 +++++++++ src/hb-ot-shape-complex-use.cc | 3 +++ 4 files changed, 24 insertions(+) diff --git a/src/hb-common.cc b/src/hb-common.cc index 140ee0a..5ef832c 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -507,6 +507,9 @@ hb_script_get_horizontal_direction (hb_script_t script) /* Unicode-8.0 additions */ case HB_SCRIPT_OLD_HUNGARIAN: + /* Unicode-9.0 additions */ + case HB_SCRIPT_ADLAM: + return HB_DIRECTION_RTL; } diff --git a/src/hb-common.h b/src/hb-common.h index 199f648..2cbee76 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -311,6 +311,15 @@ typedef enum /*8.0*/ HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), /*8.0*/ HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), + /* + * Since 1.3.0 + */ + /*9.0*/ HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), + /*9.0*/ HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), + /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), + /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), + /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), + /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), /* No script set. */ HB_SCRIPT_INVALID = HB_TAG_NONE, diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index b3372bd..36d945a 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -345,6 +345,15 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) case HB_SCRIPT_SIDDHAM: case HB_SCRIPT_TIRHUTA: + /* Unicode-8.0 additions */ + case HB_SCRIPT_AHOM: + //case HB_SCRIPT_MULTANI: + + /* Unicode-9.0 additions */ + case HB_SCRIPT_BHAIKSUKI: + case HB_SCRIPT_MARCHEN: + case HB_SCRIPT_NEWA: + /* If the designer designed the font for the 'DFLT' script, * use the default shaper. Otherwise, use the specific shaper. * Note that for some simple scripts, there may not be *any* diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc index d2b6e63..249268b 100644 --- a/src/hb-ot-shape-complex-use.cc +++ b/src/hb-ot-shape-complex-use.cc @@ -184,6 +184,9 @@ has_arabic_joining (hb_script_t script) case HB_SCRIPT_MANICHAEAN: case HB_SCRIPT_PSALTER_PAHLAVI: + /* Unicode-9.0 additions */ + case HB_SCRIPT_ADLAM: + return true; default: -- 2.7.4