{"action":"closed","issue":{"url":"https://api.github.com/repos/ibireme/YYText/issues/479","repository_url":"https://api.github.com/repos/ibireme/YYText","labels_url":"https://api.github.com/repos/ibireme/YYText/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/ibireme/YYText/issues/479/comments","events_url":"https://api.github.com/repos/ibireme/YYText/issues/479/events","html_url":"https://github.com/ibireme/YYText/issues/479","id":174447720,"number":479,"title":"YYLabel使用非系统字体时，lineSpacing属性有bug","user":{"login":"shixiaoda","id":5226741,"avatar_url":"https://avatars.githubusercontent.com/u/5226741?v=3","gravatar_id":"","url":"https://api.github.com/users/shixiaoda","html_url":"https://github.com/shixiaoda","followers_url":"https://api.github.com/users/shixiaoda/followers","following_url":"https://api.github.com/users/shixiaoda/following{/other_user}","gists_url":"https://api.github.com/users/shixiaoda/gists{/gist_id}","starred_url":"https://api.github.com/users/shixiaoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shixiaoda/subscriptions","organizations_url":"https://api.github.com/users/shixiaoda/orgs","repos_url":"https://api.github.com/users/shixiaoda/repos","events_url":"https://api.github.com/users/shixiaoda/events{/privacy}","received_events_url":"https://api.github.com/users/shixiaoda/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-01T06:39:40Z","updated_at":"2016-09-01T16:19:53Z","closed_at":"2016-09-01T16:19:53Z","body":"使用[UIFont systemFontOfSize:13]字体时，行间距属性设置为0，显示正常。\r\n但字体换成SourceHanSansCN-Light时，设置行间距,显示异常。\r\n同样代码，换成UILabel则没有这个问题。\r\n如果需要 思源字体文件，请联系我 QQ 393259282\r\n\r\n//评论内容\r\n    NSInteger maxRows = replyItem.MaxRows > 0 ? replyItem.MaxRows : 3;\r\n    CGFloat max_heigh = maxRows <= 0 ? CGFLOAT_MAX : maxRows * 13 + (maxRows - 1)*7;\r\n    CGSize contentSize = CGSizeMake(self.width - customcover_W_H_new - cell_ori_x *2, CGFLOAT_MAX);\r\n    \r\n    NSMutableAttributedString* content = [[NSMutableAttributedString alloc] initWithString:replyItem.Content];\r\n//    content.font = [UIFont systemFontOfSize:13];\r\n    content.font = [UIFont customFontOfSize:13];//[UIFont fontWithName:@\"SourceHanSansCN-Light\" size:fontSize]\r\n    content.color = grayTitleColor2;\r\n    content.lineSpacing = 0;\r\n    YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:contentSize text:content];\r\n    \r\n    self.contentLabel.frame = CGRectMake(0, 0, self.width - 24 - cell_ori_x*2, CGFLOAT_MAX);\r\n    self.contentLabel.numberOfLines = 0;//replyItem.MaxRows > 0 ? replyItem.MaxRows : 3;\r\n    self.contentLabel.font = [UIFont customFontOfSize:13];\r\n//    self.contentLabel.size = layout.textBoundingSize;\r\n    self.contentLabel.attributedText = content;\r\n//    self.contentLabel.textLayout = layout;\r\n    self.contentLabel.backgroundColor = [UIColor greenColor];\r\n    [self.contentLabel sizeToFit];\r\n    \r\n\r\n    \r\n    [self setConstraints];\r\n"}}
{"actor":{"display_login":"shixiaoda"}}