-
Notifications
You must be signed in to change notification settings - Fork 22
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
Measuring HtmlContext text with spaces is broken #71
Labels
Comments
I found the issue - in typesettable/src/contexts/html.ts Line 91 in 6b4a333
<span> with the text and measure the span. To measure the width of a single space character we append "bdpql" on either side. In my case the span was line-wrapping to put the bdpql's on separate new lines, and using the space as a line break. This never happened in svg since svg text never linewraps
In general, this strategy for measuring doesn't feel right, we're working against browser's html layout engine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This negative value then feeds up the chain for generic line/text measuring
The space measuring breaks because of the "useGuards" logic
The text was updated successfully, but these errors were encountered: