Closed TomasEm closed 2 months ago
FontManager
single instance object is constructed in the initialization
section, so there should be no issue with thread safety there. (However, the constructor could be improved by raising an exception if the aFontManager var isn't nil, just in case a user tries to create a second instance.)
From what you've described, ISTM that you could reasonably load all your fonts into FontManager
in the primary thread before you start multithreading. And assuming the above TFontManager.GetBestMatchFont
should be thread safe.
Thank you, will try it this way. I'm also using only one font.
Hi, have an application for generating images with texts. As images are huge amount, I make new version with multiple threads. How can I make this ready, when FontManager should be only one instance, idealy under linux commandline application? Could you help me? Thanks