# Font::getStringWidth on non-message thread

**URL:** <https://forum.juce.com/t/font-getstringwidth-on-non-message-thread/20853>\
**Category:** General JUCE discussion\
**Created:** [February 6, 2017, 2:58pm UTC](https://forum.juce.com/t/font-getstringwidth-on-non-message-thread/20853 "2017-02-06T14:58:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 6, 2017, 10:56am UTC](https://forum.juce.com/t/font-getstringwidth-on-non-message-thread/20853/4 "2017-07-06T10:56:21Z")

</div>

BTW font rendering and thread-safety i remember this problem, where i already posted an example how to recreate a crash

> [@Threading issue with Graphics::drawText](https://forum.juce.com/t/threading-issue-with-graphics-drawtext/16520/15):
>
> Here is example Code to recreate the problem: Its build x64 and WITHOUT direct write #if JUCE\_USE\_DIRECTWRITE != 0 #error // this example works only when DIRECTWRITE is Disabled #endif class MainContentComponent : public Component, public Timer, public Thread { public: //============================================================================== MainContentComponent() : Thread("BackgroundThread") { setSize(600, 400); startTimer(1); } ~MainContentComponent() { stopThr…

---

_[View the full topic](https://forum.juce.com/t/font-getstringwidth-on-non-message-thread/20853)._
