[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

Any progress on this…? Here’s what we landed on for a fix on our side: macOS/Font: Use generic colour space when creating CGColor(s) inside … · HYPERHYPER/JUCE@833a7ce · GitHub

Thanks for raising this, and sorry for the delay in response.

I’ve merged a fix to develop: