NSMutableAttributedString with adjustsFontSizeToFitWidth is broken on iOS 14

Originator:merfisku
Number:rdar://FB8699725 Date Originated:
Status:Potential fix identified Resolved:iOS 14.2
Product:iOS Product Version:14.0
Classification: Reproducible:Yes
 
In iOS 14 if you create NSMutableAttributedString and add some attribute let's say 

attributedString.addAttribute(.backgroundColor, value: UIColor.blue, range: .init(location: 1, length: 1))  

then adjustsFontSizeToFitWidth = true will stop working i.e. label won't resize but will be truncated even though it would perfectly fit if font size was adjusted. 

On previous iOS versions everything works as intended.

Comments

It was fixed with iOS 14.2

I am running on the same issue. I am looking for some workarounds: https://stackoverflow.com/q/64483280/2968650

I have the same problem if I add NSTextAttachment (image) to the attributed string

Having the same problem.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!