[HarfBuzz] Using Harfbuzz & ICU & Glyphy in OpenES2 Engine

Behdad Esfahbod behdad at behdad.org
Wed Feb 12 23:48:19 CET 2014


On 14-02-07 05:01 PM, Jeremy Moles wrote:
> I nearly have everything working locally, but the one area I'm having a lot of
> trouble with is knowing how--and in fact, WHOSE responsibility it is--to
> determine how to break large lines of text given my sizing constraints. This
> doesn't appear to be something harfbuzz attempts to do, but it may have helper
> functions nonetheless.

In short: You shape the whole paragraph using HarfBuzz, then create a
line-break iterator with ICU and walk the text and glyph string together and
find the best break opportunity to fill the line.  That can be
mid-HarfBuzz-cluster.  After that, you reshape the line, but can continue with
the original shaped-paragraph for the next lines.

Can be made twice faster, yes.  We're not quite there yet.

All this is implemented eg. in pango-layout.c

-- 
behdad
http://behdad.org/


More information about the HarfBuzz mailing list