[BUG] (macOS) juce::AttributedString colour drawing issue

JUCE v6.0.1
macOS 10.15.6

The following code:

void MainComponent::paint (juce::Graphics& g) {
    const auto redColour = juce::Colour (0xffff0000);
    g.setColour (redColour);
    g.fillRect (getLocalBounds());

    auto attributedString = juce::AttributedString ("hello colour");
    attributedString.setColour (redColour);
    attributedString.setFont (juce::Font (200));
    attributedString.setJustification (juce::Justification::centred);
    attributedString.draw (g, getLocalBounds().toFloat());

produces the following result:

Looks like a color space mismatch issue.

Temporary fix for us here…

or even better…

Since I’m seeing this

1 Like