Identify script/bidi runs yourself and ask Harfbuzz to shape each run one-by-one.
Konstantin 2013/4/7 Lóránt Pintér <[email protected]> > Hi, > > I'm struggling with the problem of shaping mixed text. Say I have Thai and > English text that I would like to shape. If I put all of it in a buffer, > HarfBuzz chooses a shaper based on the first identifiable character, and > then uses that shaper for the whole text. So "<thai><english>" gets shaped > fine with the Thai shaper, but "<english><thai>" gets messed up because it > is shaped with the default shaper. > > I was trying to figure out how Pango does this, but found nothing yet. > > Is it possible to ask HarfBuzz to identify text runs inside a buffer (or > some other way) that can be shaped with different shapers? If there was a > call that would identify the script (and maybe writing direction) of each > character in the input, then I could split the buffer at positions where > these a different script is used. > > Thanks. > > -- > > *Lóránt Pintér* > > Developer at Prezi <http://prezi.com> > > _______________________________________________ > HarfBuzz mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/harfbuzz > >
_______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
