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
[TIMOB-23114] iOS: Fix semi-bold and bold fonts-weights #9294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed, using:
MacOS 10.12.6 (16G24b)
Studio 4.9.0.201705302345
Ti SDK 7.0.0.v20170809111003
Appc NPM 4.2.9
Appc CLI 6.2.3
Alloy 1.9.13
Xcode 8.3.3 (8E3004b)
Font weight now includes semibold. Bold and italics are working as expected. Semibold fonts can also be used by their postscript name.
if (self.isBoldWeight) { | ||
UIFont* theFont = [UIFont boldSystemFontOfSize:self.size]; | ||
UIFont* theFont = [UIFont systemFontOfSize:self.size weight:UIFontWeightBold]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API is available in iOS 8.2 and above only. Need to put check for same.
- (UIFont *)systemFontOfSize:(CGFloat)fontSize weight:(CGFloat)weight NS_AVAILABLE_IOS(8_2);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't on purpose, since we target 8.2 and later since SDK 6.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we do 8.0 I guess. Maybe we can find out the raw-value and pass that one instead - for backwards-compatibility? We can't, since the systemFontOfSize:weight
selector is iOS 8.2 as well. Mhhh. Might have to wait until SDK 7.0.0 then. @eric34 thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hansemannn We could get it in before 7.0.0 but I am ok with pushing it out of 6.2.0 with a decent comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do it in 7.0.0, I am trying not to risk anything here.
@@ -180,14 +180,16 @@ -(UIFont *) font | |||
} | |||
} else if (self.isItalicStyle) { | |||
font = [[UIFont italicSystemFontOfSize:self.size] retain]; | |||
} else if (self.isSemiboldWeight) { | |||
font = [[UIFont systemFontOfSize:self.size weight:UIFontWeightSemibold] retain]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
Fixed as part of #9308 |
JIRA: https://jira.appcelerator.org/browse/TIMOB-23114