Line break refactoring in preparation for bidirectional text support. - #3725
Merged
Merged
Conversation
ChrisLoer
force-pushed
the
cloer_linebreak_refactor
branch
from
November 30, 2016 23:25
31cbcab to
2bad8cc
Compare
|
@ChrisLoer is this going to be incorporated into this PR? #3658 (comment) Solving the line-breaking issue with |
ChrisLoer
force-pushed
the
cloer_linebreak_refactor
branch
2 times, most recently
from
December 1, 2016 04:16
401abe8 to
5e10967
Compare
Contributor
Author
|
@nickidlugash As you mentioned in #3658 (comment), the parentheses issue will probably go beyond the scope of this PR, although I'm happy to start working on a separate PR for that issue. |
mourner
reviewed
Dec 2, 2016
| lineBreakPoints.forEach(lineBreak => { | ||
| lines.push(text.substring(start, lineBreak)); | ||
| start = lineBreak; | ||
| }); |
Member
There was a problem hiding this comment.
Please use a for (const lineBreak of lineBreakPoints) { ... } loop here instead of forEach.
ChrisLoer
force-pushed
the
cloer_linebreak_refactor
branch
2 times, most recently
from
December 2, 2016 18:30
427195f to
48818e7
Compare
jfirebaugh
approved these changes
Dec 5, 2016
* Separates line-breaking logic from glyph placement * Adds U+2027 "Interpunct" to ideographic breaking character set * Trims whitespace from beginning and end of line before calculating width for alignment purposes. * Fixes a crash on labels that generated lines with a single whitespace glyph.
ChrisLoer
force-pushed
the
cloer_linebreak_refactor
branch
from
December 5, 2016 18:09
48818e7 to
8408313
Compare
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Separates line-breaking logic from glyph placement. Introduces a few small behavior changes:
shaping.test.js updated to reflect invisible behavior changes (e.g. invisible glyphs no longer added to shaping).
cc @lucaswoj @jfirebaugh @mollymerp @1ec5