p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
@mathewpan2 @dhowe @davepagurek Just want to check in, is this ready to merge? We can revisit this as part of 2.0 but want to get fixes in for 1.x where possible and not breaking changes.
Resolves #6893
Changes:
Added the
_handleAlignment
function inp5.Font.js
totextToPoints
, so that it also follows the renderer's current alignment.Screenshots of the change:
When
textAlign(CENTER, BASELINE);
was called, the text points and the normal text would be misaligned.Before the change:![error](https://github.com/processing/p5.js/assets/112679001/f9e443be-57c6-43c1-8f34-69c2f1fa882e)
After the change:![fixed](https://github.com/processing/p5.js/assets/112679001/3d8d0ee5-b553-461d-8067-926cf2c298fe)
PR Checklist
npm run lint
passes