Unicode data providers can now be subclassed, including support for
chain-up. The interface should now be nicely bindable, as well.
Also fix glib unicode funcs that where broken after hb_script_t
changes. Nicely caught by the test-unicode.c added in this commit.
This includes HB_DIRECTION_INVALID and HB_SCRIPT_INVALID.
The INVALID will cause a "guess whatever from the text" in hb_shape().
While it's not ideal, it works better than the previous defaults at
least (HB_DIRECTION_LTR and HB_SCRIPT_COMMON).
The problem with HB_TAG_STR() was that it expected a string of size 4
exactly, and unlike hb_tag_from_string() it doesn't pad the tag with
space characters. So, the new name is more appropriate.
Since we now assert thos in hb-private.h, the int types cannot be wrong.
(Except for when someone else includes hb-common.h in a very broken
configuration, but that's not our problem!)
Plus, we don't use inline in the public headers, so remove that too.
That better matches OpenType spec. Note that we enable it for all
Arabic-shaper scripts. Ie. we enable it by default for Syriac too,
but the SyriacOT spec does not require it. I think this is a more
useful compromise than special-casing for Arabic script alone.
The --features parsing handles errors now. More importantly, it
allos limiting individual features to specific byte ranges. The
format is Python-esque. Here is how it all works:
Syntax: Value: Start: End:
Setting value:
"kern" 1 0 ∞ # Turn feature on
"+kern" 1 0 ∞ # Turn feature off
"-kern" 0 0 ∞ # Turn feature off
"kern=0" 0 0 ∞ # Turn feature off
"kern=1" 1 0 ∞ # Turn feature on
"kern=2" 2 0 ∞ # Choose 2nd alternate
Setting index:
"kern[]" 1 0 ∞ # Turn feature on
"kern[:]" 1 0 ∞ # Turn feature on
"kern[5:]" 1 5 ∞ # Turn feature on, partial
"kern[:5]" 1 0 5 # Turn feature on, partial
"kern[3:5]" 1 3 5 # Turn feature on, range
"kern[3]" 1 3 3+1 # Turn feature on, single char
Mixing it all:
"kern[3:5]=0" 1 3 5 # Turn feature off for range