You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed due to some failing regression tests on a project I'm working on that there are some very subtle differences between 2.6.0 and 2.6.1.
It seems measureText now gives a different result. With 28px Noto Sans, ctx.measureText("by Joe Bloggs") returns 176.65234375 on 2.6.0 and 175 on 2.6.1. (indeed all measureText results now appear to be integers, but they're not a simple rounding as this example shows).
In this case the rendered result seems to be identical despite the different measure. However, we also use measureText for wrapping, and so in some cases text now wraps differently than it did under 2.6.0.
Something also seems to have changed in PNG output - the byte sizes are now slightly smaller for identical images in my tests, using the same output settings.
I'm using prebuilt binaries (not building from source) - could this be down to these being built against different dependency versions? Should that be expected (is there any way to pin external build dependencies?)
Steps to Reproduce
Happy to update this with a repro case if it's regarded as unexpected
Environment
Version of node-canvas 2.6.0 vs 2.6.1
Environment: node 10.16 on macOS 10.15.3:
The text was updated successfully, but these errors were encountered:
I don't see anything that changed between 2.6.0 and 2.6.1 that would cause this, so my guess is on a dependency also. @chearon might remember if a dependency was updated. You might try npm install canvas --build-from-source (I don't think yarn forwards that flag) as a troubleshooting measure.
Issue
I noticed due to some failing regression tests on a project I'm working on that there are some very subtle differences between 2.6.0 and 2.6.1.
It seems
measureText
now gives a different result. With28px Noto Sans
,ctx.measureText("by Joe Bloggs")
returns176.65234375
on 2.6.0 and175
on 2.6.1. (indeed allmeasureText
results now appear to be integers, but they're not a simple rounding as this example shows).In this case the rendered result seems to be identical despite the different measure. However, we also use
measureText
for wrapping, and so in some cases text now wraps differently than it did under 2.6.0.Something also seems to have changed in PNG output - the byte sizes are now slightly smaller for identical images in my tests, using the same output settings.
I'm using prebuilt binaries (not building from source) - could this be down to these being built against different dependency versions? Should that be expected (is there any way to pin external build dependencies?)
Steps to Reproduce
Happy to update this with a repro case if it's regarded as unexpected
Environment
The text was updated successfully, but these errors were encountered: