Text Justification - Map looks much better now!


This has by far been the most difficult feature to get right - dynamic text justification. 

Something that I was constantly thinking about before this feature was that the lines were just left aligned and in all the vintage like maps like this I was always seeing justified text. Since P5.js doesn't support text justification natively, I had to write the algorithm myself and literally calculate the placement of each word that's rendered on the canvas. After a week, I'm pretty happy with the outcome and I now have a process to create justified text even for non-rectangular areas!Text Justification working for non-rectangular areas


Leave a comment

Log in with itch.io to leave a comment.