On 01/13/2011 06:44 PM, Andre Poenitz wrote:
On Thu, Jan 13, 2011 at 09:07:46AM +0100, Abdelrazak Younes wrote:
On 01/13/2011 08:48 AM, Pavel Sanda wrote:
Stephan Witt wrote:
The metrics cache computes the width of every single character -
inclusive cacheing of it (to get better performance). But the
drawing is done with complete text strings and if a font supports
kerning e.g. it's absolutely correct to respect it on drawing.
LyX cursor positioning simply operates in a parallel universe...
... and uses the metrics cache numbers.
See ticket http://www.lyx.org/trac/ticket/6920
its clearly not just mac os thing. this starts to be currently
most annoying bug we have and the proper solution probably means
rewrite the painting routines.
http://www.lyx.org/trac/ticket/7235
There are three solutions:
1) compute the metrics 8 times for a word of 8 letters
2) draw letter by letter all the times.
3) or rely on more on Qt widgets (i.e. use QTextEdit) instead on
doing our thing.
4) Compute the metrics for a word twice, once as a whole, once by
letter, and interpolate cursor position?
Yes, that should mostly solve the issue.
Abdel.