Let hb_shape() guess script and direction...
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 16 Mar 2011 17:53:32 +0000 (14:53 -0300)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 16 Mar 2011 17:53:32 +0000 (14:53 -0300)
commit3286fc0e9adc3f2874c9409e7fdb09e4d2b7dda1
tree0b9a8a906e3c6442397a1aabe971739923f83b0d
parentb7b29684df67af7280b74ca4cf18f02ad6521bdc
Let hb_shape() guess script and direction...

- Rename HB_SCRIPT_INVALID_CODE to HB_SCRIPT_INVALID

- Add HB_DIRECTION_INVALID

- Make hb_script_get_horizontal_direction() public

- Make hb_shape() guess script from buffer text (first non-common
  non-inherit script) if buffer script is set to HB_SCRIPT_INVALID (this
  is NOT the default.)

- Make hb_shape() guess direction from buffer script if buffer direction
is set to HB_DIRECTION_INVALID (this is NOT the default.)

- Make hb-view.c set INVALID script and direction on the buffer.

The above changes are meant to make hb-view fairly useful for uni-script
uni-direction text.  The guessing behavior however is NOT the default of
hb_shape() and must be asked for explicitly.  This is intended, because
the guess is not a suitable substitute to full-fledged bidi and script
segmentation.  It's just a testing tool.
src/hb-common.h
src/hb-icu.c
src/hb-ot-shape.cc
src/hb-shape.cc
src/hb-unicode-private.h
src/hb-unicode.c
src/hb-unicode.h
src/hb-view.c