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
Added fontHinting attribute (off by default to better match font weights in browser rendering). Setting it to true may result in crisper edges but adds some weight to the font.
Bugfixes
Text spacing
Setting letterSpacing no longer indents text at beginning of line
letterSpacing now properly handles negative values
Now uses font metrics' default leading when the line-height is left unspecified in the ctx.font string (NB: this is likely to cause vertical shifts for non-alphabetic baselines)
Updated baseline offset calculations for middle & hanging to better match browsers
The actualBoundingBox* & lines[].x/y/width/height rectangles returned by measureText() are now just the glyph-occupied area, not the whole line-height of the textblock
Fixed the sign on actualBoundingBoxLeft (positive values now mean left of the origin)
lines[].baseline now corresponds to the selected ctx.textBaseline, previously it was always the alphabetic baseline
TypeScript definitions no longer include the entire DOM library (which had been pulling in tons of non-Canvas-related object types that this library doesn't emulate)