isn't that less accurate than what i’m doing here? since at least we are accounting for changes in ligature width or kerning
> On Jul 1, 2016, at 12:10 AM, Behdad Esfahbod <[email protected]> wrote: > >> On Thu, Jun 30, 2016 at 9:06 PM, <[email protected]> wrote: >> >> >>> On Jun 30, 2016, at 11:41 PM, Behdad Esfahbod <[email protected]> wrote: >>> >>> No, it wouldn't be safe necessarily. That's exactly what the >>> unsafe-to-break API is about, but that's not finished yet. For now, >>> you have to reshape the entire new string. >> >> That’s O(n^2) in terms of the amount of shaping that has to be done per >> paragraph based on the length of the paragraph text, and not workable in >> practice > > What Pango (and possibly other systems) does is to shape the full > paragraph, then find line-break location, then reshape the > just-decided line but continue with the rest of the paragraph as if > the shaping wouldn't change the width much. > >>>> On Thu, Jun 30, 2016 at 8:31 PM, Kelvin Ma <[email protected]> >>>> wrote: >>>> If I have the string A = 'affifibcd' and the master list of shaped glyphs >>>> >>>> [a 0] [ffi 1] [fi 4] [b 6] [c 7] [d 8] >>>> >>>> and I wanted to shape the substring A[2:] ('fifibcd'), could I simply take >>>> my preshaped glyphs after the cluster at or above (ceiling) i = 2 and only >>>> reshape the segment A[2:6]? >>>> >>>> So I would reuse the glyphs >>>> >>>> [fi 4] [b 6] [c 7] [d 8] >>>> >>>> and reshape the segment A[2:6] = 'fifi' to get >>>> >>>> [fi 2] [fi 4] >>>> >>>> and add them together (dropping the last glyph in the reshaped segment) to >>>> get >>>> >>>> [fi 2] [fi 4] [b 6] [c 7] [d 8] >>>> >>>> ? >>>> Would this be the same result as reshaping the entire segment A[2:]? Would >>>> this still work for RTL text, or a substring that’s on the left-hand side >>>> of >>>> the parent string like A[:5] = 'affif'? >>>> >>>> _______________________________________________ >>>> HarfBuzz mailing list >>>> [email protected] >>>> https://lists.freedesktop.org/mailman/listinfo/harfbuzz >>>> >>> >>> >>> >>> -- >>> behdad >>> http://behdad.org/ > > > > -- > behdad > http://behdad.org/ _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
