BarrageRenderer icon indicating copy to clipboard operation
BarrageRenderer copied to clipboard

更改字体

Open yeyifeng1991 opened this issue 3 years ago • 1 comments

如何根据用户设置更改弹幕字体

yeyifeng1991 avatar Nov 20 '21 11:11 yeyifeng1991

descriptor.params[@"fontSize"] = descriptor.params[@"fontFamily"] =

可以参考UILabel+BarrageView文件

id fontSizeObj = params[@"fontSize"];
CGFloat fontSize = fontSizeObj?[fontSizeObj doubleValue]:16.0f;

NSString *fontFamily = params[@"fontFamily"];
self.font = fontFamily?[UIFont fontWithName:fontFamily size:fontSize]:[UIFont systemFontOfSize:fontSize];

alpheus55 avatar Jul 11 '23 07:07 alpheus55