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

CoreText note #111

Open
GarthGit opened this issue Dec 9, 2020 · 3 comments
Open

CoreText note #111

GarthGit opened this issue Dec 9, 2020 · 3 comments

Comments

@GarthGit
Copy link

GarthGit commented Dec 9, 2020

CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].

@GarthGit
Copy link
Author

GarthGit commented Dec 9, 2020

-(void)setMinLabelFont:(UIFont *)minLabelFont{
_minLabelFont = minLabelFont;
if ([_minLabelFont.fontName isEqualToString:@".SFUI-Regular"]) {
self.minLabel.font = (__bridge CFTypeRef _Nullable)(@"TimesNewRomanPSMT");
}else{
self.minLabel.font = (__bridge CFTypeRef)_minLabelFont.fontName;
}
self.minLabel.fontSize = _minLabelFont.pointSize;
}

-(void)setMaxLabelFont:(UIFont *)maxLabelFont{
_maxLabelFont = maxLabelFont;
if ([_maxLabelFont.fontName isEqualToString:@".SFUI-Regular"]) {
self.maxLabel.font = (__bridge CFTypeRef _Nullable)(@"TimesNewRomanPSMT");
}else{
self.maxLabel.font = (__bridge CFTypeRef)_maxLabelFont.fontName;
}
self.maxLabel.fontSize = _maxLabelFont.pointSize;
}

@GarthGit
Copy link
Author

GarthGit commented Dec 9, 2020

TTRangeSlider.m 文件中
方法 setMinLabelFont
方法 setMaxLabelFont

@A-Tan5
Copy link

A-Tan5 commented Jan 12, 2021

It's been discussed here:
#99

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