Multi-thread font rendering

I know this is a long ongoing topic, but when I draw Text either form a background thread, or using a OpenGLGraphic-Context inside a OpenGL-renderCallback, I get multiple issues.

They all have in common that somehow Glyphs/GlyphArrangement/GlyphCache is involved.

I guess that these routines simply not designed to be used on multiple threads and would therefore suggest the following.

  • give a warning every time some non mml-thread tries to do something glyph related
     static GlyphCache& getInstance()
     {
+        JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
         auto& g = getSingletonPointer();

or

design the whole text-rendering so It can be used from multiple threads