Font madness

image

Anyone any bright ideas why this (the funny writing) might happen? I think we are using a TextLayout here to draw instead of the regular drawText we use in the rest of the plugin. The font is an embedded one in the plugin. It only occurs sometimes…

Is this on Mac? I’ve been seeing something similar for the last 6 months or so. Unfortunately I don’t know the cause. Sometimes my fonts change and then jump back to normal on the next repaint.

Yes Mac. Stays like that till i restart the plugin…!

Yes, this has been driving me mad for 6 months too. Seems to either get scrambled like that or display the wrong font.

As @G-Mon says though, it seems to go away after a while. Maybe something we’re doing is refrtthe cache…

Does it affect all fonts in all sizes for you… it only seems to affect our title text, the rest of the labels are all the same!!

This issue crops up from time to time on our products too, and on seemingly random users machines! I thought I was going crazy :slight_smile: Mostly in the text of the tab names in our plugin’s preference window, everything else was fine. In our case, removing any setDefaultSansSerifTypeface calls to our custom LookAndFeel fixed it. But then we have to add more code to manually set fonts of different Components…

I don’t suppose anyone has any fixes to weird font problems since JUCE 5.4.2, as I now have this (after upgrading from JUCE 4) which used to be gorgeous (english!) text:

image

Seems to only affect AttributedString/TextLayout use. Regular drawText is working fine!

I have similar issues in windows with fonts becoming garbled now and then. It is not always easy to reproduce. It only happens with AttributedString / TextLayout and never with drawText.

image

Still an issue as far as I know. We got this from a customer recently using a fairly recent JUCE 6 build I think.

Possibly related to this? Garbled text on macOS

I ve seen that kind of stuff as well when using static Font data member in plugin.

Looks like you need to grab back font each time plugin count is set to zero and DeletedAtShutdown things are called