On 1/2/07, Hans Leidekker hans@it.vu.nl wrote:
On Tuesday 02 January 2007 19:42, * * wrote:
StringAnalysis should have a cache object, not save the HDC directly.
I agree, although you shouldn't free the cache in ScriptStringFree, the caller is responsible for that.
One of the important things about the cache, which wine currently doesn't do, is that the caller is free to select a different font into the HDC after calling ScriptStringAnalyse and Uniscribe is supposed to use the right one.
Yes, cache handling is still very basic. If the font changes the cache should be invalidated. It also needs to be ref counted and locked.
According to MSDN, the "pending" error is to give the calling app a chance to select the matching font back into the DC if the information wasn't cached. I think that the get_script_cache function is broken, in that it should return the pending error if the HDC isn't provided, since the HDC in the cache might no longer have the same font selected. However maybe some applications don't deal with the pending case properly.
{{ Seems with wine-devel the default action isn't reply to list, I've got to be more careful when replying }}
-- Richard Voigt
-Hans