# Candera Engine 2D

#### Glyph Atlas TextBrush Cache

This version introduces a new text brush cache which uses a glyph atlas.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Reworked TextNode2D

Parts of [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") have been rewritten. Main changes happened to the internal render processes. The rework was necessary for asynchronous text rendering. The performance of [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") increased with this rework.   
The behavior of [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") slightly changed:

<div class="contents" id="bkmrk-it-were-possible-to-"><div class="contents"><div class="textblock">- It were possible to attach a [TextNode2DLayouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d_layouter.html "Base Layouter for TextNode2D nodes.") to [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") and not using the layouter. This led to undesired visual output but text were visible. Now in this case the layouter has to be used otherwise no (or old) text will be shown.
- In some corner cases (e.g. mixed bidirectional text) the truncation with ellipsis can truncate the text in a wrong manner. This will be part of the next TextEngine update.
- Fixed some incorrect layout issues.
- Some of these layout issues affect all text types which are using TextEngine (not only [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.")).
- A multiline text with a truncated line did not show all the lines after the truncated line anymore. This has been fixed.

---

</div></div></div>#### Asynchronous text rendering

[TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") can be rendered asynchronously now. A SceneComposer flag for each [TextNode2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html "TextNode2D is a RenderNode that renders text using the attached BitmapBrush effect.") were added. With this update text can be rendered in a worker thread or in a single threaded version. This improves the handling of the resources used to render text. Performance of text rendering might be improved on some systems (e.g. multicore system or using the vsync time to render).

Further information of how to use asynchronous text rendering can be found in the Text-Tutorial (No. 5) which received a new chapter for asynchronous text rendering.

---