Skip to content

Commit

Permalink
Fix ligatures at the end of paragraph (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomura authored Mar 1, 2019
1 parent 1bc45ae commit 0210f79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/layout/linebreaker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ export default ({ penalty } = {}) => () => {
return [...acc, line];
}, []);

const lastLine = glyphString.slice(start, glyphString.length);
const lastLine = glyphString.slice(
start,
glyphString.glyphIndexForStringIndex(glyphString.string.length),
);
lines.push(lastLine);

return lines;
Expand Down

0 comments on commit 0210f79

Please sign in to comment.