BR: rendered text layout is sometimes wrong/swapped in JUCE8

Tested on macOS, latest JUCE develop branch (July 16); Xcode 15.2.

How to trigger:

  • Open Hello World JUCE8 example from within the projucer
  • In HelloWorldDemo.h, change the Label and TextButton text strings as follows:
    Label helloWorldLabel { {}, String("100    +100")};
    TextButton quitButton { String("100    +100") };

In the rendered output, the ‘+’ sign and the spaces are rendered in the wrong order - see screenshot:

Screenshot 2024-07-16 at 11.52.30 AM

This seems to happen with various combinations of numbers, a plus or minus sign, spaces, and more numbers, but not in all cases…? I’ve tested this with different fonts as well but the issue remains.

1 Like

Another way to trigger this issue:

open the DemoRunner, and start the CodeEditorDemo

Type the following text:
100, followed by a bunch of spaces, and followed by +100

Output rendered in the demo runner, with characters in the wrong order:
Screenshot 2024-07-16 at 12.06.45 PM

It gets even funnier when putting a plus and minus in-between the area with spaces; depending on the number of spaces, the plus and minus sign swap positions or move around.

Thanks for reporting this.

There is a fix for a few of these text related bugs in the works.

1 Like

Good to hear, looking forward to any updates.

This should be fixed on develop.

1 Like

Yep, the latest develop version works great; thanks!