File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export class FormattedString extends formattedStringCommon.FormattedString {
2121 for ( p = 0 ; p < span . spanModifiers . length ; p ++ ) {
2222 attrDict . setObjectForKey ( span . spanModifiers [ p ] . value , span . spanModifiers [ p ] . key ) ;
2323 }
24- var nsAttributedString = NSMutableAttributedString . alloc ( ) . initWithStringAttributes ( spanText , attrDict ) ;
24+ var nsAttributedString = NSMutableAttributedString . alloc ( ) . initWithStringAttributes ( String ( spanText ) , attrDict ) ;
2525 mas . insertAttributedStringAtIndex ( nsAttributedString , spanStart ) ;
2626 spanStart += spanLength ;
2727 }
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ export class Span extends spanCommon.Span {
2222 if ( realFontFamily ) {
2323 font = UIFont . fontWithNameSize ( realFontFamily , realFontSize ) ;
2424 }
25- else {
25+
26+ if ( ! font ) {
2627 var fontDescriptor = UIFontDescriptor . new ( ) ;
2728 var symbolicTraits ;
2829 if ( realFontAttributes & enums . FontAttributes . Bold ) {
@@ -33,12 +34,11 @@ export class Span extends spanCommon.Span {
3334 }
3435 font = UIFont . fontWithDescriptorSize ( fontDescriptor . fontDescriptorWithSymbolicTraits ( symbolicTraits ) , realFontSize ) ;
3536 }
36- if ( font ) {
37- this . spanModifiers . push ( {
38- key : NSFontAttributeName ,
39- value : font
40- } ) ;
41- }
37+
38+ this . spanModifiers . push ( {
39+ key : NSFontAttributeName ,
40+ value : font
41+ } ) ;
4242 }
4343
4444 var realForegroundColor = this . foregroundColor ||
You can’t perform that action at this time.
0 commit comments