This significantly (50% in my tests) speeds up loading large files in notepad. Tests show that native seems to do something similar.
Is it reused if you select different font between calls?
On 2018-01-13 21:44, Nikolay Sivov wrote:
Is it reused if you select different font between calls?
As far as I can tell, the application is responsible for invalidating its uniscribe data if the font changes (which would involve calling ScriptFreeCache, thus dropping the refcount and preventing reuse). Wine's usp10 so far never seems to invalidate a script cache.
That said, I'm not really sure about that at all, so I'll look at adding some tests for a scenario like that.
Thanks, Thomas
On 2018-01-14 01:46, Thomas Faber wrote:
On 2018-01-13 21:44, Nikolay Sivov wrote:
Is it reused if you select different font between calls?
As far as I can tell, the application is responsible for invalidating its uniscribe data if the font changes (which would involve calling ScriptFreeCache, thus dropping the refcount and preventing reuse). Wine's usp10 so far never seems to invalidate a script cache.
That said, I'm not really sure about that at all, so I'll look at adding some tests for a scenario like that.
Hmm I understand your point now. It looks like Windows doesn't use the hdc, but instead uses the font itself to look up existing caches. I'll update the patch to include those tests and compare the LOGFONT instead of the HDC.
Thanks, Thomas