-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fixed text measurement regression #978
Conversation
@@ -213,8 +213,8 @@ private static YogaSize MeasureText(ReactTextShadowNode textNode, YogaNode node, | |||
var normalizedHeight = YogaConstants.IsUndefined(height) ? double.PositiveInfinity : height; | |||
textBlock.Measure(new Size(normalizedWidth, normalizedHeight)); | |||
return MeasureOutput.Make( | |||
(float)textBlock.DesiredSize.Width, | |||
(float)textBlock.DesiredSize.Height); | |||
(float)Math.Ceiling(textBlock.DesiredSize.Width), |
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.
Ceiling [](start = 32, length = 7)
That's strange that cropping occurs on WPF and not on UWP. We were going to use the same technique for UWP, but fixed the rounding issue in Yoga. facebook/yoga#300
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.
does that mean we should publish a new package (same hash they published to npm/cocoapods), and then update our version reference to fix the issue?
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 actually think this is also a problem on UWP still too. Can you add the Math.Ceiling to UWP as well?
* fixed text measurement regression * also apply fix to UWP text * also applied fix to textinput
* fixed text measurement regression * also apply fix to UWP text * also applied fix to textinput
* fixed text measurement regression * also apply fix to UWP text * also applied fix to textinput
When we don't round up the text always gets clipped.