Is boundary analysis already a part of Haiku or do we need to add it?
On 19 May 2017 2:15 p.m., "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
wrote:
19 mai 2017 10:25 "Stephan Aßmus" <superstippi@xxxxxx> a écrit:
You demonstrate this well in your video. I mean to say that if youchange the text rendering to use
shaping, BTextView would still allow to position the text cursorinbetween two characters which are
actually combined by shaping.and "previous" possible
In other text layout APIs, there are usually methods to know the "next"
caret position from a given position. We would need to offer the sameand make BTextView use it.
ICU calls this "boundary analysis" and provides the required classes
(BreakIterator). This should also be used for word boundaries, line breaks,
etc. Using ICU as a backend for this would be nice, because it would remove
quite a lot of the complexity in BTextView.
http://userguide.icu-project.org/boundaryanalysis
We should also make this part of the Locale Kit API, as other applications
(for example NetSurf) may do their own text layouting and they would want
to use it.
--
Adrien.