Underlining has stopped working for TextLayout / AttributedString

Underlining has stopped working for us on macOS, and it seems to have started at this commit: https://github.com/WeAreROLI/JUCE/commit/9e77d94789d8db9a793c6b665c12c05e9bb78b04

Hmm, I tried just doing a bodge that underlines all fonts, and it seems to be underlining stuff…

The change you linked to was the one that allowed CoreText layout to be used for in-memory fonts, so perhaps it’s CoreText that’s failing to create the underlining for your particular font? Can you narrow it down to some example code that fails, which we could try?

Absolutely! I’ve set up a small example repo using JUCE’s default audio plugin project here. The underline appears correctly prior to the commit mentioned above, and after that point is missing.

The project assumes you have Arial installed at /Library/Fonts/Arial.ttf.

@george-spitfire Was this and issue you found in our code that you fixed in our JUCE fork. I seem to remember a one-liner

The only change I’ve made in TextLayout is related to string ranges within Runs, I haven’t touched anything to do with underlining unfortunately.

Any updates on this?

Just checking in again — any new info on this?