gnustep-dev
[Top][All Lists]
Advanced

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

Re: Problem with text in buttons


From: Riccardo Mottola
Subject: Re: Problem with text in buttons
Date: Mon, 07 Jan 2013 10:12:31 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20121007 Firefox/15.0.1 SeaMonkey/2.12.1

Hi,

Fred Kiefer wrote:
It turns out that this problem was caused by a change I made in the horizontal typesetter. There when the width of the text container is above 1e7 we now ignore the alignment attribute, just as Apple does. This change is correct, but it requires an additional change in the string drawing code. There we can no longer reuse a layout manager that has been set up without a container size when we require the layout in a container with a given size. That change itself was easy to make and is now in the code. But it has a big downside. Now when we first ask for the size of the attributed string and later draw it, we now longer find the layout already in that cache. Most likely this was the biggest source of cache hits that we had and now they are gone, the string needs to be processed twice. We really need a better solution here. The old code was incorrect as it did give different results from what Apple displayed, but the new code is inefficient, which is almost as bad.

Any help here to come up with a better way is highly appreciated.
Fred
I see, this comes out from the long private discussion we are having with Nikolaus. I can't think of a general solution if we have to respect this Apple behaviour. But perhaps the first layout manager without size can be set up with one in certain specific cases? The best would be of course to be able to maintain the cache somehow.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]