Weird characters displayed in tooltip

Hey there,

I just got the feedback from a customer that the tooltip in our product displays weird characters. He sent me the following screenshot:

I have never seen something like this occur and we have tested it on multiple systems. He says he is on a macOS Mojave v10.4.6 machine using Reaper.

The tooltip is defined by using the setTooltip() function on a button.

Has somebody an idea what could cause this problem and how to solve it?

1 Like

Hi–curious if you found a remedy for this?

@GarrettBurnett it happens when the user has the same font installed locally on the machine as the one you’ve loaded as a system font in the app, you need to overwrite JUCE to point to the one you’ve loaded in that app – no idea why it occurs but a resolution:

Typeface::Ptr CustomGlobalLookAndFeel::getTypefaceForFont(const Font& f)
{
    /* NOTE -- THIS FIXES AN ISSUE OF COLLISION WHEN USERS HAVE THE SAME FONT INSTALLED LOCALLY */
    
    if (f.getTypefaceName() == "XYZ" && f.getTypefaceStyle() == "XYZ") {
        return MYFONT_I_DEFINED;
    }
    
    return LookAndFeel_V4::getTypefaceForFont(f);
}
2 Likes

Simple repro is to add / remove the font in question from your system Font Book btw – you should see it go away and appear if this is the problem

Hope you’re good btw : )

2 Likes

@jakemumu GOAT!

Weirdly, this issue is only being experienced on AttributedStrings for some users and the repro there doesn’t cause the problem for me… (still a goat tho)

I’d check if somehow the attributed string is getting around your look and feel you’ve loaded? Is it on a secondary window where look and feel has not been set?