Pass ZWJ/ZWNJ to HarfBuzz across shape run boundaries
Pass ZWJ/ZWNJ to HarfBuzz across shape run boundaries

ZWJ and the characters next to it may be separated into different shape
runs by bidi, script or font-fallback splitting. Nevertheless, ZWJ must
affect Arabic-script characters on both sides of itself. This is noted
in the description of the Unicode bidirectional algorithm [TR9-Joiners]
and matches the observed behavior of VSFilter (GDI/Uniscribe).

Fixes https://github.com/libass/libass/issues/545.

We could more easily pass the whole event text to HarfBuzz rather than
single out ZWJ and ZWNJ, but that would produce results different from
VSFilter's: it shapes each high-level run in isolation; and in the rare
case that Arabic text is set in a font that is missing some glyphs,
GDI/Uniscribe apply font fallback and choose isolated/initial/final
letter forms for each section separately, without joining the letters
from different fonts together (which HarfBuzz would do if we gave it the
full surrounding context), unless an explicit ZWJ is placed in between.

Unlike ZWJ, I have not been able to produce a test for ZWNJ that would
confirm whether VSFilter does this for ZWNJ as well. It should not matter
for Arabic as the boundaries are non-joining by default, but it might
make a difference for Indic scripts or others. It seems to make sense,
so in absence of evidence to the contrary, this commit applies the same
treatment to ZWNJ as well.

[TR9-Joiners]: https://unicode.org/reports/tr9/#Joiners

MrSmile/libass,astiob/libass,libass/libass,ShiftMediaProject/libass,MrSmile/libass,ShiftMediaProject/libass,libass/libass,astiob/libass