Juce 5.4.4 OSX Mojave and ComponentAnimator, possible bug?

I have a custom component that creates a sort of a dialog window within another component, without creating a new window. It has always worked great since the day I wrote it. Now that I’ve installed the latest Juce update 5.4.4 and compiled a new project on OSX Mojave using that same class, the component appears with a strange “distortion”:

46

The Component has two labels and two buttons, the label on the top makes the window title, and as you can see from the picture above, it looks distorted.

This is the function that invokes the opening of the window with a fade-in effect using ComponentAnimator:

void Show(String title, String message, String btnYesText, String btnNoText = "CANCEL", ModalComponentManager::Callback *callback = nullptr)
{
	animator.fadeIn(this, 150);

	lblTitle->setText(title, dontSendNotification);
	lblMessage->setText(message, dontSendNotification);
	btnYesOk->setButtonText(btnYesText);
	btnNoCancel->setButtonText(btnNoText);

	if (callback != nullptr)
	{
		btnYesOk->setBounds(win_w - button_padding - 120, win_h - 50, 120, 40);
		btnNoCancel->setVisible(true);
		enterModalState(true, callback);
	}
	else
	{
		btnNoCancel->setVisible(false);
		btnYesOk->setBounds((win_w - 120) / 2, win_h - 50, 120, 40);
		toFront(true);
	}
}

This function is made to create both a YES/NO dialog with a callback function, or a simple OK dialog with no exit value.

The class object is created once when the program starts, and destroyed on quit, and the dialog window is just shown or hidden dunring the program’s life.

Of course it works normally on Windows. I don’t want to start a debate, but the strangest things always happen on OSX and almost never on Windows… who know why! :slight_smile:

Any hint is appreciated. T.i.a.

ComponentAnimator hasn’t changed since 2018, could this be another example of the still unsolved text drawing bug that’s been reported?

It’s definitely something related to the text drawing, and you’re right, I’m giving for granted that it has something to do with the animation, because all other labels created in the program appear correctly, but even the second label of this component, which represents the dialog’s message body, appears corrected. Only the top label is distorted.

The top label (dialog title) is set as:

lblTitle->setFont (Font (22.00f, Font::plain).withTypefaceStyle ("Bold Italic"));

The bottom label (dialog body) is set as:

lblMessage->setFont (Font (18.00f, Font::plain).withTypefaceStyle ("Regular"));

Ok, I stand corrected. The distorted text has nothing to do with the ComponentAnimator. I changed the style “Bold Italic” to “Regular” and it’s now displaying correctly.
Something wrong with the “Italic” style?

1 Like