-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Justified text: rudimentary implementation for lines...
...with whitespace characters. (We can expand the line only in the whitespace locations.) Relates to #428 . The canonical best-case implementation of this feature would be the Knuth-Plass linebreaking algorithm: http://eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf I'd love to tackle that someday, but I've yet to fully wrap my brain around it. Instead, this commit uses a straightforward greedy approach that was easy to slot into PD's existing line-breaking algorithm. Still TODO: + justifying lines that have no whitespace chars + variable handling of the last line in a paragraph (the user should really have control over this, like Photoshop provides)
- Loading branch information
1 parent
bc9c11b
commit 210d374
Showing
2 changed files
with
118 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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