From c9a841f4452921c5361b8f5697bbff7736ce60cd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 7 Apr 2012 15:06:55 -0400 Subject: [PATCH] Add simple Hangul shaper that recomposes Jamo when feasible Previously, we were NOT actually recomposing Hangul Jamo. We do now. The two lines in: test/shaping/texts/in-tree/shaper-default/script-hangul/misc/misc.txt Now render the same with the UnDotum.ttf font. Previously the second linle was rendering boxes. We can also start applying OpenType Jamo features later. At this time, I have no idea how the 'ljmo', 'vjmo', 'tjmo' features are supposed to work. Maybe someone can explain them to me? --- src/hb-ot-shape-complex-misc.cc | 16 ++++++++++++++++ src/hb-ot-shape-complex-private.hh | 15 +++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 98831fb99..20e365bd8 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -53,3 +53,19 @@ _hb_ot_shape_complex_setup_masks_default (hb_ot_map_t *map, hb_buffer_t *buffer) } + +void +_hb_ot_shape_complex_collect_features_hangul (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +{ +} + +hb_ot_shape_normalization_mode_t +_hb_ot_shape_complex_normalization_preference_hangul (void) +{ + return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL; +} + +void +_hb_ot_shape_complex_setup_masks_hangul (hb_ot_map_t *map, hb_buffer_t *buffer) +{ +} diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index ae01a3a69..7c2c7a940 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -50,6 +50,7 @@ #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \ HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \ HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \ + HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \ HB_COMPLEX_SHAPER_IMPLEMENT (indic) \ /* ^--- Add new shapers here */ @@ -69,6 +70,7 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props) default: return hb_ot_complex_shaper_default; + /* Unicode-1.1 additions */ case HB_SCRIPT_ARABIC: case HB_SCRIPT_MONGOLIAN: @@ -82,6 +84,17 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props) return hb_ot_complex_shaper_arabic; + + /* Unicode-1.1 additions */ + case HB_SCRIPT_HANGUL: + + return hb_ot_complex_shaper_hangul; + + + + /* ^--- Add new shapers here */ + + #if 0 /* Note: * @@ -191,8 +204,6 @@ hb_ot_shape_complex_categorize (const hb_segment_properties_t *props) case HB_SCRIPT_TAKRI: return hb_ot_complex_shaper_indic; - - /* ^--- Add new shapers here */ } }