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

Conversation

@jason-simmons
Copy link
Member

@jason-simmons jason-simmons commented Apr 17, 2019

currentLineWidth is the width passed into Paragraph layout, which comes
from the maxIntrinsicWidth returned by a previous call to Paragraph layout.
That width is calculated by Layout::measureText.

postBreak is calculated from the character widths in the LineBreaker.

A slight mismatch between these two widths may unnecessarily cause the
insertion of desperate breaks in addWordBreak. Adding some slack to
currentLineWidth works around this.

Fixes flutter/flutter#30347

currentLineWidth is the width passed into Paragraph layout, which comes
from the maxIntrinsicWidth returned by a previous call to Paragraph layout.
That width is calculated by Layout::measureText.

postBreak is calculated from the character widths in the LineBreaker.

A slight mismatch between these two widths may unnecessarily cause the
insertion of desperate breaks in addWordBreak.  Adding some slack to
currentLineWidth works around this.

Fixes flutter/flutter#30347
@jason-simmons jason-simmons merged commit 4b9966f into flutter:master Apr 18, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 18, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Apr 18, 2019
flutter/engine@06fea14...4b9966f

git log 06fea14..4b9966f --no-merges --oneline
4b9966f Add an adjustment to the line width check in LineBreaker::addWordBreak (flutter/engine#8623)
60bb866 Roll src/third_party/skia a94670bd08cd..2c2240f66805 (2 commits) (flutter/engine#8632)
a144f17 Tight Paragraph Width (flutter/engine#8530)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (cbracken@google.com), and stop
the roller if necessary.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text wrapping issue with specific font settings

3 participants