<div>
<div>Hi Behdad,</div><div><br></div><div>I’m not sure if this is that thread, but I seem to recall that you talked a while ago about adding support for better line ending shaping. I.e. when the last letter of a line is kerned with the next character, I’ll get the kerned width of the character, even though the kerning won’t be used on anything, and the line will slightly hang outside the line.</div><div><br></div><div>Are there any improvements regarding this?</div>
</div>
<div><div><br></div><div>-- </div><div><p style="margin: 0px; font-size: 12px; font-family: 'Trebuchet MS'; color: rgb(35, 35, 35); "><b>Lóránt Pintér</b></p>
<p style="margin: 0px; font-size: 12px; font-family: 'Trebuchet MS'; color: rgb(35, 35, 35); ">Developer at <a href="http://prezi.com"><span style="color: rgb(18, 85, 204); ">Prezi</span></a></p></div></div>
<p style="color: #A0A0A8;">On Saturday 27 October 2012 at 17:00, Lóránt Pintér wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>I'm not sure I completely understand this feature. Would this help with shaping around line-endings as well?</div><div><br></div><div>-- </div><div>Lóci</div><div><br></div><div>On 2012.10.25., at 3:17, Behdad Esfahbod <<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>> wrote:</div><div><br></div><blockquote type="cite"><div><div>Hi,</div><div><br></div><div>A while back I added support for dottedcircle insertion in HarfBuzz. That</div><div>happens in two cases:</div><div><br></div><div> - In Indic module, when a cluster is not wellformed. This seems to be</div><div>functioning good enough.</div><div><br></div><div> - At the beginning of text, when text starts with a combining mark.</div><div><br></div><div>The latter caused the same bug in GNOME, Firefox, and Chromium: if a combining</div><div>mark is not supported by the default font, it gets associated with a fallback</div><div>font, and the mark is shaped in the fallback font in isolation. This would</div><div>then cause a dottedcircle to be inserted because a mark starts the run text.</div><div>To address this bug, I added "textual context" support, where the client can</div><div>tell HarfBuzz what text precedes, and what follows, the text being shaped.</div><div>This "fixed" the problem in GNOME after I changed Pango to pass that</div><div>information to HarfBuzz.</div><div><br></div><div>However, this concerns me now, because I imagine most users won't pass the</div><div>textual context information in, and will hit the same bug. So I like to</div><div>explore addressing it in a way that the simplest usecase won't be affected by</div><div>the bug.</div><div><br></div><div>At the same time, I started looking at adding AAT/morx support to HarfBuzz,</div><div>and looks like morx has different modes for when text is paragraph/line</div><div>start/end. OpenType has similar features, but only for optical alignment.</div><div><br></div><div>So it made me wondering whether I should add a set of flags to hb_shape() to</div><div>let user specify whether the text run is paragraph/line start/end. If we add</div><div>that, the default (no flags) would mark the run being "in the middle", and</div><div>dottedcircle won't be inserted. The flags also address the AAT/morx</div><div>requirement. Whether we should automatically enable OpenType line start/end</div><div>optical alignment is not very clear to me yet, but that would be a possibility.</div><div><br></div><div>So, what do people think? Should I go ahead and do that? If yes, I need to</div><div>think the logical/visual distinctions and implications. And, should I change</div><div>the hb_shape() / hb_shape_full() API? Or add new parallel API, or what? I</div><div>used to have placeholder for shaper-options in the API but removed it for</div><div>simplicity. If I add now, it would be a small headache for all users, but</div><div>will keep it open for use to add more binary flags in the future. In the</div><div>interest of breaking users sooner than later, I thought I bring it up now.</div><div><br></div><div>If we add that API, we can also add more flags, like "don't remove invisible</div><div>characters", or "don't add dottedcircle", though the value of the latter is</div><div>not quite clear to me. I definitely don't want to expose too much of the</div><div>internal workings, so I'm not sure whether I want to expose "don't do fallback</div><div>positioning", but I'm still undecided. Leaving it possible to add up to 32</div><div>flags by one ABI change sounds compelling though.</div><div><br></div><div>Cheers,</div><div>behdad</div><div>_______________________________________________</div><div>HarfBuzz mailing list</div><div><a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a></div><div><a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a></div></div></blockquote></div></div></span>
</blockquote>
<div>
<br>
</div>