-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
SVG letter-spacing is calculated wrongly #5192
Comments
|
can you link the SVG? |
You mean |
So regarding: Letter spacing is affected by transform, indeed i put a scale 0.2 on the SVG and the letter-spacing is reduced to mantain proportions. There are 2 bugs here:
If we could know that at this point fontSize is 220px, this would parse correctly |
Sorry about my misunderstanding of the problem. And thanks for investigating! :) |
Anyway, I've just realized that in the sample SVGs I've provided, the Seems like Adobe Illustrator generates invalid(?) values on SVG export. EDIT: Looks like it's actually unclear whether unit-less values should be allowed in such cases: https://jwatt.org/svg/authoring/#specifying-units |
well now works better! |
Indeed. But there's still another rendering issue in the second sample SVG. I'm not quite sure what's going on. It's around the multiple |
tspans are unsopperted yet |
Version
master
@ 2a476e4 (didnpm run build
to builddist
)Test Case
https://fabricjs-issue-svg-letter-spacing.netlify.com/
Steps to reproduce
letter-spacing
andtransform
Expected Behavior
letter-spacing
is not affected bytransform
Actual Behavior
letter-spacing
is affected bytransform
Looks like a similar bug happened in Chrome before: https://stackoverflow.com/questions/36132450/chrome-v49-letter-spacing-in-svg-with-transform-matrix/36764459
The text was updated successfully, but these errors were encountered: