Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更改字体 #105

Open
yeyifeng1991 opened this issue Nov 20, 2021 · 1 comment
Open

更改字体 #105

yeyifeng1991 opened this issue Nov 20, 2021 · 1 comment

Comments

@yeyifeng1991
Copy link

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

@alpheus55
Copy link

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];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants