letter-spacing is not taken into account when calculating size
Closed this issue · 3 comments
skand888 commented
letter-spacing: 0.03125em;
is not taken into account when calculating style for rendering text.
const { fontStyle, fontVariant, fontWeight, fontSize, fontFamily } = this.style;
// font string format: {normal, normal, 700, 20px, Roboto, "Helvetica Neue", sans-serif}
ctx.font = fontStyle + ' ' + fontVariant + ' ' + fontWeight + ' ' + fontSize + ' ' + fontFamily;
As the result, if input style sets letter-spacing
(such as Angular 15 body-1
typography level), text overflows the control.
joshuawwright commented
@skand888 Thanks I will look into it.
joshuawwright commented
@skand888 This has been fixed in version 15.0.0. Cheers!
skand888 commented
Thanks a lot! It works well now.