-
Notifications
You must be signed in to change notification settings - Fork 806
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
Fix bug in sizeWithFont #1917
Fix bug in sizeWithFont #1917
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,9 +259,8 @@ - (CGSize)_sizeWithAttributes:(NSDictionary<NSString*, id>*)attributes constrain | |
size.width = std::numeric_limits<CGFloat>::max(); | ||
} | ||
|
||
if (size.height == 0.0) { | ||
size.height = std::numeric_limits<CGFloat>::max(); | ||
} | ||
// Return the height that the text actually requires rather than the constrained size | ||
size.height = std::numeric_limits<CGFloat>::max(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so wait the expectation of the constrainedToSize: contract is that the height passed in doesn't matter at all? that seems... wrong... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yiyang-msft and I reproduced this on the reference platform, but it's likely that this only applies to a case where we are only drawing one line but unable to fit it. I'm going to be doing more testing to see where height is respected and where it is not, and if this also applies to CTFramesetterSuggestFrameSizeWithConstraints. #Resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also,please verified with MM. check with the introduction label on first screen. In reply to: 99942712 [](ancestors = 99942712,99671953) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this change the introduction label in Islandwood house is being scaled properly In reply to: 99943020 [](ancestors = 99943020,99942712,99671953) |
||
|
||
return CTFramesetterSuggestFrameSizeWithConstraints(framesetter.get(), CFRangeMake(0, self.length), nullptr, size, nullptr); | ||
} | ||
|
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.
no wonder with this, it works. :) #Resolved