Skip to content

Commit

Permalink
Fix an off-by-one affecting letter spacing in Flutter
Browse files Browse the repository at this point in the history
See flutter/flutter#103705

Change-Id: I8b2a91af907e05fd3af144af35ebf498d7357ddd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541978
Reviewed-by: Julia Lavrova <[email protected]>
Commit-Queue: Jason Simmons <[email protected]>
  • Loading branch information
jason-simmons authored and SkCQ committed May 19, 2022
1 parent a6178be commit 29996e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/skparagraph/src/TextLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TextLine::TextLine(ParagraphImpl* owner,
}

// TODO: This is the fix for flutter. Must be removed...
for (auto cluster = &start; cluster != &end; ++cluster) {
for (auto cluster = &start; cluster <= &end; ++cluster) {
if (!cluster->run().isPlaceholder()) {
fShift += cluster->getHalfLetterSpacing();
break;
Expand Down

0 comments on commit 29996e8

Please sign in to comment.