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

[TIMOB-23114] iOS: Fix semi-bold and bold fonts-weights #9294

Closed
wants to merge 1 commit into from

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn added this to the 7.0.0 milestone Aug 9, 2017
@hansemannn hansemannn self-assigned this Aug 9, 2017
@ewieberappc ewieberappc self-requested a review August 9, 2017 22:23
Copy link
Contributor

@ewieberappc ewieberappc left a 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];
Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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?

Copy link
Contributor

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.

Copy link
Collaborator Author

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];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@hansemannn
Copy link
Collaborator Author

Fixed as part of #9308

@hansemannn hansemannn closed this Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants