Bug with Alert Window text and embedded fonts in 5.3.1


#1

There’s a bug in 5.3.1 which isn’t in 5.3.0 or before.

We have some fonts embedded which are built via the binary builder and refer to those in our look and feel via MyCustomLookAndFeel::getAlertWindowTitleFont.

In 5.3.1 the text appears as a string of seemingly random characters.
If i switch to returning the default font : return Font() the text is fine.

We double checked by rebuilding against 5.3.0 and the problem went away. This problem doesn’t appear on windows for any juce version.

I also read the diffs of 5.3.1 vs 5.3.0 and noticed that juce_graphics/native/juce_mac_Fonts.mm has seen a lot of changes recently but my expertise doesn’t yet stretch further than assuming that’s probably something to do with it.


Custom Typeface bug in JUCE pop-up dialogs
#2

I’m quite sure that’s the same bug I reported last week and comes from removing a workaround for memory-based fonts. In my opinion this can currently only happen on OSX 10.11 and maybe 10.12. Older OSX versions still use the workaround and at least for me things work fine on 10.13. Are you also running 10.11?

Here’s the other thread where I shared a screenshot:


Slow TextLayout on OSX with memory-based fonts
#3

3 of us are experiencing the issue and afaik were all either 10.11 or 10.12. I’m 10.12 and have the bug.


#4

Just wondering as it’s so weird: does your output look similar to mine where every character is offset by 2?


#5

That is a good question. I’ll check and let you know.


#6

So with this code : AlertWindow::showMessageBox(AlertWindow::InfoIcon, “ABCDEFGHI”, “MEssage”);

(I know it says MEssage, not Message)

I get this displayed :

39%20PM


#7

Thanks. As we are not using the same font, this probably means it’s a general bug. For a temporary workaround just make canAllTypefacesBeUsedInLayout in juce_mac_Fonts.mm return false, but this really should be fixed in the lib.


#8

@normalised @pflugshaupt did one of you tried to revert the commit that touched juce_graphics/native/juce_mac_Fonts.mm?


#9

No, the changes are good, I just need the workaround to stay enabled on 10.11 and 10.12 so I just override OS detection by returning false in the method mentionned above.


#10

Thanks for the bug report. Let’s continue the discussion here: