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

Wrong font on iOS 13 #99

Closed
tdimeco opened this issue Sep 11, 2019 · 8 comments
Closed

Wrong font on iOS 13 #99

tdimeco opened this issue Sep 11, 2019 · 8 comments

Comments

@tdimeco
Copy link

tdimeco commented Sep 11, 2019

Hi,

There is a small issue on iOS 13 GM: The font of the min/max labels seems to be set to Times New Roman instead of the system default one, San Francisco.

iOS 12:
ios-12

iOS 13:
ios-13

Using rangeSlider.minLabelFont or rangeSlider.maxLabelFont has no effect.

Also, the console prints the following message:

CoreText performance note: Client called CTFontCreateWithName() using name ".SFUI-Regular" and got font with PostScript name "TimesNewRomanPSMT". For best performance, only use PostScript names when calling this API.
CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.

Thank you.

@ghost
Copy link

ghost commented Sep 17, 2019

+1

@immago
Copy link

immago commented Oct 15, 2019

Fix: remove .fontName

-(void)setMinLabelFont:(UIFont *)minLabelFont{
    _minLabelFont = minLabelFont;
    self.minLabel.font = (__bridge CFTypeRef)_minLabelFont;
    self.minLabel.fontSize = _minLabelFont.pointSize;
}

-(void)setMaxLabelFont:(UIFont *)maxLabelFont{
    _maxLabelFont = maxLabelFont;
    self.maxLabel.font = (__bridge CFTypeRef)_maxLabelFont;
    self.maxLabel.fontSize = _maxLabelFont.pointSize;
}

@TomThorpe
Copy link
Owner

Thanks - If people can confirm this works and someone wants to PR it I'll be happy to approve it 👍

@tdimeco
Copy link
Author

tdimeco commented Oct 17, 2019

CATextLayer.font documentation prohibits the use of UIFont. But it actually seems to work. However, in the sample Demo, the $ character is missing in iOS 13. Maybe it's related to the use of UIFont?

iOS 12
iOS 12

iOS 13
iOS 13

@tdimeco
Copy link
Author

tdimeco commented Oct 17, 2019

The missing $ caracter is actually an issue with the iOS simulator, so forget about it ;)

Alasker added a commit to Alasker/TTRangeSlider that referenced this issue Feb 12, 2020
@Alasker
Copy link

Alasker commented Feb 12, 2020

Thanks - If people can confirm this works and someone wants to PR it I'll be happy to approve it 👍

Tested on iPhoneXr running iOS13.3.1. Problem visible before the fix, gone after applying it.

TomThorpe added a commit that referenced this issue Feb 12, 2020
Fix CoreText issue in iOS13 (#99)
@TomThorpe
Copy link
Owner

Thanks - I’ve merged that PR

@tdimeco
Copy link
Author

tdimeco commented Feb 25, 2020

Thanks! :-) Maybe a 1.0.7 version should be released?

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

4 participants