Wow, it took me a few days to find the right fix!
We now set the advance for attached marks to zero, but we
do this in the _finish() state of gpos, so it shouldn't
regress with fonts like DejaVuSansMono that explicitly
decrease the mark advance width to set it to zero.
We need to know whether the glyph exists, so we can fallback to
composing / decomposing. Assuming that glyph==0 means "doesn't exist"
wouldn't work for applications like Pango that want to use different
"doesn't exist" glyph codes for different characters. An explicit
return value fixes that.
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.
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.
- 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.
We should ensure-direction before doing any complex work. The only
exception is mirroring that needs to see the original / final direction,
not the native. Handle that.
Previously boolean features turned on the entire feature mask. This is
wrong if feature is Alternate and user has provided values bigger than one.
Though, I don't think other engines support such corner cases.