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/ _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
