On 01/13/2011 10:05 AM, Jean-Marc Lasgouttes wrote:
Le 13 janv. 2011 à 09:42, Stephan Witt a écrit :
Am 13.01.2011 um 09:33 schrieb Pavel Sanda:
Abdelrazak Younes wrote:
To be on the save side - if nothing else is changed - you have to draw
letter by letter all the times anyway.
The option can set to true by default.
i also wonder what the 'few more cpu cycles' mean. we are already quite slow
at rendering...
Yes, I'd refrain from fast implemented solutions for that.
At least give JMarc a chance to answer here.
He spoke the last word on ticket http://www.lyx.org/trac/ticket/6920.

Stephan
Well, I can cut and paste my comment :)

Could we compute the metrics at word level and still find a way to place the 
cursor (e.g. compute char by char when we need to place it inside a string)?

Abdel, wouldn't that be possible and reasonably easy?

Or did you already dismiss this possibility?

Yes, that's option 1 :-)
The only way to position the cursor 100% correctly is to compute the metrics of a char when _within_ a word.

But your remark triggered an idea in my head that would at least improve the situation:
Compute the metrics for a given row in two pass:

1) word by word as you suggested, and store the words position in the row
2) character by character for each word.

This would at least avoid to accumulate the cursor offsets for each words at the end of the line. This wouldn't work well of course for very long words like we have in CJK (and German :-)).

Abdel.


Reply via email to