From 5dd4724e3ccb3ca5b2f677d525b057f07b15da68 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 15 Apr 2020 19:09:17 +0800 Subject: [PATCH] iOS:Text Font cannot be applied propertily --- doric-iOS/Pod/Classes/Shader/DoricTextNode.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricTextNode.m b/doric-iOS/Pod/Classes/Shader/DoricTextNode.m index 61081ac9..da4d56bc 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricTextNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricTextNode.m @@ -109,7 +109,8 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro view.doricLayout.maxHeight = [prop floatValue]; } else if ([name isEqualToString:@"font"]) { NSString *iconfont = prop; - UIFont *font = [UIFont fontWithName:iconfont size:view.font.pointSize]; + UIFont *font = [UIFont fontWithName:[iconfont stringByReplacingOccurrencesOfString:@".ttf" withString:@""] + size:view.font.pointSize]; view.font = font; } else if ([name isEqualToString:@"lineSpacing"]) { [[self ensureParagraphStyle] also:^(NSMutableParagraphStyle *it) {