How can I change the font size of a NSAttributedString
that has been initialized with
init(data: Data, options: [NSAttributedString.DocumentReadingOptionKey : Any] = [:], documentAttributes: AutoreleasingUnsafeMutablePointer<NSDictionary?>?)
Actually I have strings that contain html tags, I use the extension given here by Roger Carvalho.
The html tags are correctly rendered but the font is not the same as the regular one given by FontSizeMetrics
:
let fontMetrics: FontSizeMetrics = FontSizeMetrics()
let font = UIFont(name: "NotoSans", size: fontMetrics.fontRegular)