"Replaced a deprecated glyph drawing" commit broke italicized text in osx app?

i just upgraded to 5.4.4 and all of my text disappeared. i bisected it to this commit - any context for this change that could help me trace this down? i’m on osx 10.14.6.

1 Like

There were some issues with text layout following that commit but they were solved in ece16bc which also made its way into the 5.4.4 release.

I can’t see any text rendering issues when running any of the JUCE examples on 10.14.6. How are you rendering the text? If you could provide a minimal example that reproduces the problem it would help in tracking it down.

I’m also having issues with text layout on Mac after updating to JUCE 5.4.4
My code works as before on Windows, but on Mac (10.13.6, and also reproduced by another developer on another machine) text layout is getting badly mangled.
I’m calling g.drawFittedText() to display strings. Some strings display correctly, while others are displayed at incorrect locations that range from what appears to be incorrect justification, to extreme cases where the text appears far outside the Rectange that is passed to drawFittedText().

Are you using a custom font? The change you found made the text layout use more of the OSX built-in text functionality and maybe your font is broken on OS X and just happened to work with Juce as long as it was doing more work by itself for the layout … just a guess.

ah - it looks like i’m seeing issues only with drawFittedText - i did find a few places where i’m using drawText and those are displaying correctly.

I’m using the default font. I set font size to 15.0 but don’t set the font otherwise.

Is this reproducible with any of the JUCE examples? I’m on 10.14.6 and not seeing any issues, and drawFittedText() is working as expected.

ah, found the answer here:

i use italic fonts by default - removing the calls made text display again. i see a few different way that i’m setting fonts:

  Font getComboBoxFont(ComboBox &box) override
    return {jmin(15.0f, box.getHeight() * 0.6f), Font::bold | Font::italic};
  Font getLabelFont(Label &label) override
    return label.getFont().boldened().italicised();

removing the Font::italic or .italicised() makes text display again, i’ll try to repro with a juce example now.

i played around in the demo runner, a lot of fonts get very weird when bold and/or italics are selected:

1 Like

I can confirm that under OSX 10.14.6 and 10.14.5 some fonts go crazy even if only Italic is selected.

1 Like

bump - any plans to fix this?

Yep, we’re looking into it.

This should be fixed now in c78749b.

1 Like

late reply but this is fixed now, thanks @ed95!