# Text not rendered to image

**URL:** <https://forum.juce.com/t/text-not-rendered-to-image/14904>\
**Category:** General JUCE discussion\
**Created:** [June 3, 2015, 5:46pm UTC](https://forum.juce.com/t/text-not-rendered-to-image/14904 "2015-06-03T17:46:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanKolle](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankolle/32/40_2.png) [@DanKolle](https://forum.juce.com/u/DanKolle)\
**Post date:** [June 3, 2015, 5:46pm UTC](https://forum.juce.com/t/text-not-rendered-to-image/14904/1 "2015-06-03T17:46:03Z")

</div>

I use the Graphics object to render text to an image but nothing is drawn.

image.SaveAs("C:/Temp/test1.png");  
Graphics&nbsp;g(image);  
g.setFont(font);  
g.setColour(&nbsp;Colours::red&nbsp;);  
g.drawSingleLineText(&nbsp;"hello",&nbsp;0, 0 );  
image.SaveAs("C:/Temp/test2.png");  
&nbsp;

Both images are empty.

The font looks like this:  
 ![](https://www.dropbox.com/s/ykn9w46qg3ngm7b/juce_font.gif?dl=1)

The image looks like this:  
 ![](https://www.dropbox.com/s/iyugfnemzar4n6r/juce_image.gif?dl=1)

The font is not the problem as this also does not work when I change the font to Verdana.

Am I missing a step?

Thanks for any feedback.  
Dan

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 3, 2015, 6:39pm UTC](https://forum.juce.com/t/text-not-rendered-to-image/14904/2 "2015-06-03T18:39:53Z")

</div>

Until you delete or flush a Graphics object, it might not have finished rendering, so you may be saving a half-done image. Also, drawing it with its baseline&nbsp;at (0, 0) means it's probably off the top of your image.
