Garbled text on macOS


#1

Hi, one user of an application of mine has a strange problem where (most) of the text in dialogs is completely garbled:


macOS sierra 10.12.3, English

It seems that every letter is replaced with some other letter. The top two labels are “Network Name:” and “Network Port:”. The bottom buttons are “OK” and “Cancel”.

It happens with the old version of our app (from 2013 or so), but also with a rebuild with JUCE from GitHub from March 5, 2017. I have neither been able to reproduce the problem on my computers, nor has there ever been a similar report.

I use this code for creating labels:
Label* createLabel(const char* text = “”) {
Label* l = new Label("", text);
l->setColour(Label::textColourId, Colour(NETWORKSETTINGS_COLOR_TEXT));
return l;
}

It seems that if I make a label bold, it does not suffer from the garbling:
Font f = lTitle->getFont();
f.setBold(TRUE);
lTitle->setFont(f);

Does anybody have a hunch what could be going on?

Thanks,
Florian


#2

I vaguely remember fixing a similar bug a year or two ago, and it was due to hash collisions in the font code - i.e. it was pulling out the wrong glyphs from the glyph-cache because their hash codes were colliding with those for another font. But I fixed it by no longer using hashes for typefaces, so it can’t be the same bug if you really are seeing it with the latest codebase (?)