[HarfBuzz] Harfbuzz with linebreaking

Konstantin Ritt ritt.ks at gmail.com
Mon Jun 13 22:15:34 UTC 2016


Like it was answered several times already, Harfbuzz doesn't do any
itemization, including line breaking. Feel free to choose ICU (or whatever
you like more) to do all the hard work for you.


Konstantin

2016-06-13 19:00 GMT+04:00 Kelvin Ma <kelvinsthirteen at gmail.com>:

> So I’ve not received an answer to this anywhere, so, how do I typeset
> paragraphs with Harfbuzz? How do I use the ‘safe-to-break’ iterator?
>
> Because it sounds like right now I’d have to shape the *entire* paragraph
> as one line, then find the last shaped glyph that falls before the cutoff
> point, then iterate backwards from the character corresponding to the glyph
> following *that*, on each breakpoint, reshaping the whole line each time
> until something fits. Then I’d have to do that all over again for the
> second line until the entire paragraph is shaped. So to typeset 5 lines of
> text I’d have to shape about 22 lines of text. To typeset a 20 line
> paragraph I’d have to shape about 240 lines of text.
>
> Surely this is not how harfbuzz expects users to use it?
>
> (Asking because I need harfbuzz for my typesetter app
> <https://github.com/kelvin13/Knockout>)
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20160614/42a09dc1/attachment.html>


More information about the HarfBuzz mailing list