[HarfBuzz] Who is integrating Pango's shapers into HarfBuzz?

Behdad Esfahbod behdad at behdad.org
Thu May 24 12:55:48 PDT 2007


On Fri, 2007-05-18 at 15:05 -0400, Andreas Vox wrote:
> Am 18.05.2007 um 17:51 schrieb Ed Trager:
> 
> > Hi, LingNing,
> >
> > My understanding is that Simon Hausmann of QT has already integrated
> > the shapers from QT into HarfBuzz.
> 
> Yes, but he didnt use the ad-hoc headerfile we came up with in Boston.
> So while it works for Qt4, it will need some work to bring it into  
> shape for a public HB interface.
> 
> Currently there are HB native glyphbuffers, the new interface we came  
> up with in Boston, and the buffer the Qt shaping code writes into.  
> IMO we should first try to unify those structures (I have myself some  
> requirements on that for Scribus).
> 
> The next thing to polish would be the input structures for font faces  
> and shaping options and char attributes.. I think we already agreed  
> pretty much on UTF-16 for the input text.

Thanks Andreas.  That precisely reflects my opinion on the current
HarfBuzz shaper that Simon did.  I think it includes a bit of code more
than what we need, and the API certainly can be improved.

I'm currently improving and simplifying Pango's OpenType shaper.  What I
plan to do next is to move them into my own harfbuzz shaper engine and
adapt/update Owen's interface and bring them together.  Then we need to
go and look into the Qt one and pick and choose the bits that are
missing.


Note that the previous consensus that Qt's shapers are preferred was
about the Indic shaper, not about them all in general.  For Indic
shaper, nobody knows which one (Pango, Qt, ICU) is the best.  What we
know is that maintainers of Pango and ICU are not happy about theirs.
That's how it was decided to use Qt's.  But at the end, it doesn't
really matter much as the three are mostly the same, and each has its
own share of bugs.

As for other shapers, I'm pretty happy about what I have in Pango.  I
want to rewrite the Arabic joining logic to make it more robust.  Qt on
the other hand has Arabic justification and fallback shaping support
that I need to lift.  Other than that, Pango has Hebrew heuristics for
when GPOS is missing, which is good.  Also, Pango's Thai/Lao shaper has
code to support non-Unicode fonts from what I understand.  Finally,
Pango's Hangul shaper is not OpenType.

So, we may want to first port Pango/Qt shapers to a common base, and
then start moving the fallback codes to canned tables, lifting bits from
ICU, but it needs support in the harfbuzz OpenType Layout engine
first.  

Of course, I'm planning to finish my harfbuzz-ng rewrite of the Layout
engine first and continue from there, but it may prove infeasible...


Anyway, I really appreciate the time Simon and Lars have put into this
so far, and there are certainly lots of bits we will use from their
work, but I want to make sure that we do it Right this time: right API,
efficient and light implementation.

Unfortunately chances are that I won't be at the TextLayout summit.
Regardless, I'm not sure if I can get much done before then.  We will
see.


Cheers,

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759






More information about the HarfBuzz mailing list