File tree Expand file tree Collapse file tree
packages/text/platforms/ios/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,8 +235,13 @@ class NSTextUtils: NSObject {
235235 }
236236 let attributes : NSMutableDictionary ! = NSMutableDictionary ( )
237237 let iosFont : UIFont ! = spanDetails. object ( forKey: " iosFont " ) as? UIFont
238+ let fontSize : NSNumber ! = spanDetails. object ( forKey: " fontSize " ) as? NSNumber
238239 if ( iosFont != nil ) {
239240 attributes. setObject ( iosFont!, forKey: NSAttributedString . Key. font as NSCopying )
241+ if ( fontSize == nil ) {
242+ // we add a custom attribute so that canvas can see it and apply the paint font size
243+ attributes. setObject ( true , forKey: " fontSizeNotSet " as NSCopying )
244+ }
240245 }
241246 let autoFontSizeEnabled : NSNumber ! = spanDetails. object ( forKey: " autoFontSizeEnabled " ) as? NSNumber
242247 if autoFontSizeEnabled. boolValue {
You can’t perform that action at this time.
0 commit comments