Am 13.01.2011 um 09:07 schrieb Abdelrazak Younes: > 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. > > 1) would be costly in terms of performance > 2) would add be need a bit more cpu and would have the side effect that > kerning would not be as good Qt's word drawing. This is what we do already > for arabic and hebrew. > 3) is a very big task and an entirely unknown territory. Our pixmap backend > is very fast and has been optimized through the years... I am not sure we can > get achieve the same performance with QTextEdit for a 1000 pages of rich text. > > So, all in all, I vote for (2) as an lyxrc option. That is the easiest to > implement and offers the best tradeoff between performance and beauty.
Since it depends on the used fonts and the used qt-version I cannot see why to use a lyxrc option. To be on the save side - if nothing else is changed - you have to draw letter by letter all the times anyway. Stephan