Are TextRuns always sorted?
Leo Savernik
l.savernik at aon.at
Thu Aug 7 19:35:40 CEST 2003
Am Donnerstag, 7. August 2003 18:13 schrieb Dirk Mueller:
> On Don, 07 Aug 2003, Leo Savernik wrote:
> > Is this order guaranteed to always meet, or are there possibilities (say,
> > for strange bidi configurations) which break it.
>
> The order is guaranteed for KDE's KHTML.
Good.
>
> I'm not sure what you're talking about, but to get the matching TextSlave
> just call TextSlave::findFirstMatching(), which is implemented as binary
> search.
I looked at it, but this works for coordinates. I need it for offsets. I'm
using RenderText::findTextSlave which returns the appropriate text slave for
an offset into the string data, and I want to optimize it by binary search,
that's why I'm asking.
mfg
Leo
More information about the Khtml-devel
mailing list