Closed faizulhaque closed 1 year ago
There is nothing much I can do from Konva side. Different render engines may produce different results.
Even different browsers, like Chrome vs Firefox vs Safari, may produce different results.
You may try to reduce the font size manually a bit to match the required size.
You may try to reduce the font size manually a bit to match the required size.
Well, Yes, however, it should be done programmatically, but the challenge is even after applying the letterSpacing
the value of text.width()
is still less than the value of rectWidth
but visually it's going beyond the line.
So unable to find (programmatically) either the text
is going beyond the area width. Any tip/clue?
Probably need to report in canvas
library.
Thank you for submitting an issue!
Here is the demo link on the web: https://codesandbox.io/s/peaceful-bhaskara-c3rl4y?file=/src/index.js
If you observe Text and blue line, it's almost matched interms of width.
However, I tried to run the same code on server, It's going beyond the width.
Here is the server code:
Here is the server snapshot:
KonvaJS version: Frontend: "konva": "9.0.1",
NodeJS: (version: 14.19.1) "konva": "9.0.1", "canvas": "2.11.2"
Can anyone help understand Is this a bug? or I am missing something in the code (browser vs nodejs)?
Thanks in Advance, cc: @lavrton