None of the GUI-related code is designed to be thread-safe, it’d be impractical to add locking to every possible graphics function that you might call. If you need to call something like that from a background thread then you’d need to wrap it in a MessageManagerLock.
I am not using this call to render to Component, i am basically rendering thumbnail of a path in a thread… So i will render into image not to Component.
Getting only the path for glyph doesn’t look like GUI functionality… It looks like only the data access…
So can’t we make a lock on typeface while getting outline?
Well, I too faced the same issue…
And I’ve faced this issue mostly on Windows and not that much on Mac…
Aside from TypefaceCache, even the WindowsTypeface does not look thread safe.
Won’t there be issues when GetGlyphIndices and GetGlyphOutline (using the same dc) are called from multiple threads??