Underlining has stopped working for TextLayout / AttributedString


#1

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


Attaching URL to an AttributedString
#2

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?


#3

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.


#4

@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


#5

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.


#6

Any updates on this?


#7

Just checking in again — any new info on this?