<div dir="ltr">Also this might be jumping the gun a bit since we still don’t even have the “safe-to-break” thing yet but how do we know when it’s okay to reshape a broken segment or if it should just be moved to the next line? A ligature like “ffi” can and should be broken into “f” and “fi” if needed (like “ef-ficiency”) but a ligature like “👨👩👧👦” should never be shaped in 2 pieces<br><div class="gmail_quote"><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 13, 2016 at 10:33 PM, Kelvin Ma <span dir="ltr"><<a href="mailto:kelvinsthirteen@gmail.com" target="_blank">kelvinsthirteen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>If you mean how does the linebreaking work in Knockout, it places characters/glyphs (it works 1-to-1 character-to-glyph, no ligatures, substitutions) until the glyphs overrun the line length. Then it goes backwards to the last space character and forward to the next space character to get the word that the line was broken on. Then it iterates through hyphenation points until one of them is short enough to accommodate both itself and a hyphen glyph. Because it works with a 1-to-1 relationship between glyphs and characters it just counts the number of glyphs printed and uses that as the index offset for laying out the next line.<br><br></div><div>It’s a slightly more complicated process than that in reality because it also checks for other breaking characters like em dashes and slashes not just spaces, and it skips hyphenations that contain more than the original amount of characters. It can also do pairwise kerning (checks current and previous glyph to get kerning offset) but it doesn’t work often in practice because most modern fonts encode the kerning data in a different table than where freetype knows to look for it, and I’m currently using freetype to do what harfbuzz should be doing.<br><br></div><div>It works in normal time which is nice but not ideal because there is no ligatures, little kerning, no substitutions, etc. So no opentype features basically. Which is why I need harfbuzz.<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 13, 2016 at 10:01 PM, Khaled Hosny <span dir="ltr"><<a href="mailto:khaledhosny@eglug.org" target="_blank">khaledhosny@eglug.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Mon, Jun 13, 2016 at 11:00:16AM -0400, Kelvin Ma wrote:<br>
> So I’ve not received an answer to this anywhere, so, how do I typeset<br>
> paragraphs with Harfbuzz? How do I use the ‘safe-to-break’ iterator?<br>
<br>
</span>How are you doing line breaking right now?<br>
<br>
Regards,<br>
Khaled<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>