Problems with TextLayout and line wrapping


#1

I am running this code with Juce 3.2.0 on Windows 10:

AttributedString text("Some text for TextLayout that sometimes has the correct height, sometimes not.");
const int width = 200;

TextLayout textLayout;
textLayout.createLayout(text, width);

const int height = (int)textLayout.getHeight();
textLayout.draw(someGraphicsInstance);

This gives inconsistent results. Sometimes this results in a height of 45 Pixels with lines being wrapped at 200 pixels, sometimes it results in a height of 15 Pixels. In the latter case, the text also wraps at 200 pixels, but the text does not continue on a new line, but on top of the previous text (at the start position).
 

Am I doing something wrong, or is this a known bug?


#2

Sounds like the DirectWrite bug that we fixed a couple of weeks ago..?


#3

Jules, tank you very much for answering so fast (on a Sunday!). I am so sorry for wasting you time: Indeed, the bug is fixed on the current tip.