Hi !
For common glyphs like "P" where actualBoundingBoxLeft is negative (the ink starts slightly to the right of the drawing origin, due to left sidebearing), the rasterized pixels were placed at the wrong position in the output buffer.
Fix: correct the sign of actualBoundingBoxLeft in both the width calculation and the fillText position.
Reproduction:
Actual:
Wanted:
Explanation
actualBoundingBoxLeft is -12px. p is 12px at the right of the origin.

Hi !
For common glyphs like "P" where
actualBoundingBoxLeftis negative (the ink starts slightly to the right of the drawing origin, due to left sidebearing), the rasterized pixels were placed at the wrong position in the output buffer.Fix: correct the sign of
actualBoundingBoxLeftin both the width calculation and thefillTextposition.Reproduction:
Actual:
Wanted:
Explanation
actualBoundingBoxLeftis-12px.pis12pxat the right of the origin.