Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

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

Merged
jason-simmons merged 1 commit into
flutter-team-archive:masterfrom
jason-simmons:bug_18665
Aug 7, 2018
Merged

libtxt: truncate paragraph width to an integer in order to match Blink's behavior#5962
jason-simmons merged 1 commit into
flutter-team-archive:masterfrom
jason-simmons:bug_18665

Conversation

@jason-simmons

Copy link
Copy Markdown
Contributor

@jason-simmons

Copy link
Copy Markdown
Contributor Author

@chinmaygarde

@amirh amirh left a comment

Copy link
Copy Markdown
Contributor

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-team-archive: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-team-archive/engine#5952)
7e0bb3b Allow freezing a texture. (flutter-team-archive/engine#5938)
3cbb5e2 Persist DartCallbackCache contents across launches (flutter-team-archive/engine#5947)
953570a libtxt: truncate paragraph width to an integer in order to match Blink's behavior (flutter-team-archive/engine#5962)
@Hixie

Hixie commented Aug 8, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

5 participants