-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected wrap caused by lost floating point precision #104
Comments
I've seen this issue as well. |
@nextend do you know if there is a way to fix this? |
Getting this issue as well. Any ideas for a fix or workaround? |
I do not think that there will be workaround. We switched over server side rendering with headless Chrome. |
@qq15725 This problem still happens with complex example with the new version too. |
The url no access permissions |
I made it public. |
So excited for a fix for this if there is one! |
Steps To Reproduce
https://codesandbox.io/p/sandbox/modern-screenshot-forked-zdw9p9?file=%2Findex.html%3A11%2C9
Problem: The last character gets wrapped into new line on the screenshot.
The problem caused by that the window.getComputedStyle() floating precision limited to 4 decimals.
The div element with font family declaration is 74.140625px (getBoundingClientRect()) in the original rendering. In the SVG created by the library it gets 74.1406px and that small missing area cause the wrap.
Both window.getComputedStyle(temp1).width and window.getComputedStyle(temp1).inlineSize reports '74.1406px'
The text was updated successfully, but these errors were encountered: