Re: [css-text] Shaping for break-all/word-break

On Wed, Mar 9, 2016 at 12:15 PM, Behdad Esfahbod <behdad@behdad.org> wrote:

>
>> When break-all a word of 10 chars at 3:
>> 1. Shape the 3 with the rest as text-after.
>> 2. Shape the 3 without text-after.
>> 3. Shape the 10, find glyphs that map to the 3 chars and use them.
>>
>> I think you're talking about the diff between 1 and 2, correct? Is 3
>> still differ from 1?
>>
>
> All three can be different.
>
>
>> If 1 and 3 are the same, it helps our efficiency a bit.
>>
>
> I've maintained text layout engines all my professional life, I fully
> understand how it helps efficiency :).
>
> For that reason, I'm going to implement a piece of additional API in
> HarfBuzz, called "safe-to-break", which can tell the client which points in
> the text it is safe to break text and shape sides separately and still get
> the same results.  With that kind of API, you can break line, then walk
> outwards from the break location, find the first safe-to-break point, and
> reshape just the slice there, which for most simple cases will be empty.
>
> You can track the safe-to-break API progress here:
>
>    https://github.com/behdad/harfbuzz/issues/224
>

Thank you!! Having that in HB is great, and I found we're on the same page
by reading the initial sketch. It looks like I didn't write several
implicit premise, but now my understanding matches. Sorry about my
communication. Code is easier than English for me ;)

/koji

Received on Thursday, 10 March 2016 04:19:04 UTC