[HarfBuzz] Detecting mandatory ligatures

Khaled Hosny khaledhosny at eglug.org
Mon Apr 4 20:06:47 UTC 2016


On Mon, Apr 04, 2016 at 01:02:56PM -0700, Behdad Esfahbod wrote:
> On Mon, Apr 4, 2016 at 12:45 PM, Khaled Hosny <khaledhosny at eglug.org> wrote:
> 
> > On Tue, Mar 22, 2016 at 10:52:43PM +0000, Jamie Dale wrote:
> > > Hey all,
> > >
> > > I've spent today fixing some issues in our editable text controls, mostly
> > > relating to issues caused by the difference between characters and
> > grapheme
> > > clusters.
> > >
> > > I've sorted most of my issues now, but I'm still having an issue the لا
> > > ligature in Arabic.
> > >
> > > My current code that performs picking on text, or applies formatting to
> > > text that spans a ligature, assumes that any ligature can be split into
> > its
> > > component grapheme clusters, however this assumption does not hold true
> > for
> > > that ligature as it cannot be split.
> > >
> > > Does HarfBuzz have a way to identify these mandatory ligatures, or
> > failing
> > > that, how do people generally deal with this sort of thing? I have ICU
> > > available if it has anything that can help?
> >
> > You just don’t try to identify mandatory ligatures. What we are doing in
> > Scribus (that bit of code is not published yet) is to treat all
> > ligatures as unbreakable. You simply find how many characters in a
> >
> 
> s/characters/Unicode graphemes/

Right.

Regards,
Khaled


More information about the HarfBuzz mailing list