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

libtxt: truncate paragraph width to an integer in order to match Blink's behavior #5962

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

jason-simmons
Copy link
Member

@jason-simmons
Copy link
Member Author

@chinmaygarde

Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the f2f explanation!
Maybe add some explanation to the PR as well?

@jason-simmons jason-simmons merged commit 953570a into flutter:master Aug 7, 2018
liyuqian added a commit that referenced this pull request Aug 7, 2018
liyuqian added a commit to liyuqian/flutter that referenced this pull request Aug 7, 2018
b3e866e Call drawPath without clip if possible (flutter/engine#5952)
7e0bb3b Allow freezing a texture. (flutter/engine#5938)
3cbb5e2 Persist DartCallbackCache contents across launches (flutter/engine#5947)
953570a libtxt: truncate paragraph width to an integer in order to match Blink's behavior (flutter/engine#5962)
@Hixie
Copy link
Contributor

Hixie commented Aug 8, 2018

I don't think we should do this. It seems like it'll result in all kinds of weird effects. For example, suppose you're rendering text at font size 0.1 because you're in a very big scale transform or some such.

@jason-simmons
Copy link
Member Author

This change matches the layout behavior that Flutter historically had with the Blink text renderer.

I can try reverting this along with removing TextPainter._applyFloatingPointHack to see how the layout results compare (https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/painting/text_painter.dart#L256)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants