# Weird characters displayed in tooltip

**URL:** <https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386>\
**Category:** Development\
**Created:** [February 11, 2021, 8:44pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386 "2021-02-11T20:44:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bgraf](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bgraf/32/7204_2.png) [@Bgraf](https://forum.juce.com/u/Bgraf)\
**Post date:** [February 11, 2021, 8:44pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/1 "2021-02-11T20:44:23Z")

</div>

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:

 ![Screenshot 2021-02-11 at 21.39.00](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/d/d002cb9b5c1a407d47f0e682207d759cb67f46a5.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![GarrettBurnett](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@GarrettBurnett](https://forum.juce.com/u/GarrettBurnett)\
**Post date:** [April 30, 2021, 11:32pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/2 "2021-04-30T23:32:52Z")

</div>

Hi–curious if you found a remedy for this?

---

<div class="post-metadata">

**Author:** ![jakemumu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jakemumu/32/13038_2.png) [@jakemumu](https://forum.juce.com/u/jakemumu)\
**Post date:** [April 30, 2021, 11:43pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/3 "2021-04-30T23:43:29Z")

</div>

@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:

```auto
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);
}

```

---

<div class="post-metadata">

**Author:** ![jakemumu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jakemumu/32/13038_2.png) [@jakemumu](https://forum.juce.com/u/jakemumu)\
**Post date:** [April 30, 2021, 11:46pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/4 "2021-04-30T23:46:39Z")

</div>

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 : )

---

<div class="post-metadata">

**Author:** ![GarrettBurnett](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@GarrettBurnett](https://forum.juce.com/u/GarrettBurnett)\
**Post date:** [May 4, 2021, 7:12pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/5 "2021-05-04T19:12:05Z")

</div>

@jakemumu GOAT!

---

<div class="post-metadata">

**Author:** ![GarrettBurnett](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@GarrettBurnett](https://forum.juce.com/u/GarrettBurnett)\
**Post date:** [May 5, 2021, 4:35pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/6 "2021-05-05T16:35:52Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![jakemumu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jakemumu/32/13038_2.png) [@jakemumu](https://forum.juce.com/u/jakemumu)\
**Post date:** [May 6, 2021, 7:00pm UTC](https://forum.juce.com/t/weird-characters-displayed-in-tooltip/44386/7 "2021-05-06T19:00:56Z")

</div>

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?
