Garbled Text: Windows / JUCE 6

image

Look at this glorious text rendering.

JUCE 6, Graphics::drawText, embedded font Montserrat font embedded.

Any suggestions about the cause of this ugly mess?

Is that a Label or TextLayout?

Really basic drawText, like this…

auto textArea = bounds.withTrimmedTop(20);

g.setColour(LcColours::dialogTextHeading);
g.setFont(Lc::getHeadingFont(18.0f));

g.drawText(title, textArea.removeFromTop(20), Justification::centred);

textArea.removeFromTop(20);

g.drawText(productName, textArea.removeFromTop(20), Justification::centred);
1 Like

See

I’m baffled how the Juce team has been skipping those issues and general font issue those past month.

3 Likes

In the post you linked it says “does not work properly any more”. Does that mean it looks like my mess?

And yes, I do get the impression that the difficult bugs are being ignored at the moment! We have a whole set of problems with fallback fonts :slight_smile:

3 Likes

OK, after looking more closely at the image: it wasn’t what I was thinking where the wrong glyphs can get chosen in rare circumstances on macOS

No, I thought it was that. But it’s the right glyps but with something terrible happening in the top 4/5 pixels!

It means that it uses another font (the custom one installed on the user system) than the one you’ve asked hence not displaying what it should.

1 Like

i have several issues too on windows, using a fontawesome ttf embedded in the app that is not drawing as expected, most of the times i get missing glyphs (same exact code works in linux and mac). any ideas how to improve the situation ? this is turning out to be really annoying, spending too much time on stuff that should be already fixed in juce itself instead of focusing on my app.

actually, disabling direct write on windows solved the issue for me.

#define JUCE_USE_DIRECTWRITE 0

which other issues might this create ?