processing/p5.js

Support 'justified' alignment as an option for textAlign

Open

#3,354 opened on Dec 3, 2018

View on GitHub
 (13 comments) (7 reactions) (1 assignee)JavaScript (3,178 forks)batch import
Area:TypographyEnhancementHelp Wantedp5.js 2.0+

Repository metrics

Stars
 (20,784 stars)
PR merge metrics
 (Avg merge 8d 13h) (45 merged PRs in 30d)

Description

Support 'JUSTIFIED' alignment as an option for textAlign(), so that we can have text that looks like below. Note: we would need to check that the optional 'width' param was specified to text() when using this alignment. If I remember correctly there is an nice dynamic programming solution to this problem.

image

Contributor guide