[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] Font metrics and kerning update

In message <84848e1a4e.martin@xxxxxxxxxxxxxxxxxxx>
          Martin Wuerthner <lists@xxxxxxxxxxxxxxx> wrote:

> In message <5056CBC646CB4047BB26120F4377DB719BA2FE@xxxxxxxxxxxxxxxxxxx
>           "Charles Moir" <CharlesM@xxxxxxxx> wrote:
>> As to kerning metrics, assuming we do not need it for fast rendering (on
>> the basis that we do cache character positions) but text formatting
>> really needs to be a real-time operation. i.e. we should be able to
>> alter the columns widths and have text reformatted and rendered on the
>> fly during the column width change (and given our competitors can this
>> is not really an option any more).  So again there really should not be
>> any system calls during text formatting either, if we can avoid it.
> Yes, I agree. I have done a quick test and having kerning switched on
> really is a performance killer when reformatting large blocks of text.
> There is no need for a benchmark, you can see the slowness
> immediately.
> I will have a go at a kerning pairs cache. As you suggested, it should
> not be too difficult to add. I do not think any of the existing caches
> can help.

I have just implemented caching for the kern pairs, which does indeed 
speed up things quite a bit - at least to the extent that I cannot see 
any speed difference between reformatting a large block of kerned and 
unkerned text. Without the cache, the difference was quite noticeable.