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?
This commit is contained in:
Behdad Esfahbod 2012-04-07 15:06:55 -04:00
parent 9683184553
commit c9a841f445
2 changed files with 29 additions and 2 deletions

View File

@ -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)
{
}

View File

@ -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 */
}
}