-
Notifications
You must be signed in to change notification settings - Fork 20
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
[3841453] Layer FX: Text gets offset/clipped if there are layer fx added. #72
Comments
The bevel & emboss was an encoding bug that I'm fixing - something is off between the text bounds and the way they relate to bounds with FX. we are relying on EM positioning for Y and it isn't holding up with effects or maybe we are just calculating the font-size wrong? @dirkschulze if you can see maybe fresh eyes will help. |
I am currently sharing my screen at a conference. I try my best to look at some of the things during pauses. |
Ok, we have the text property which has the bounds property. This usually is far too big. But for fx effects we don't seem to get the right boundaries otherwise. Therefore I suggest using this box. |
Argh, I totally missed it. So, bonds are not correct for text layers in PS. I don't know why yet. However, that is the reason why we use other bounds. This usually works if you don't apply FX effects. If you have fx effects though, we do not use the computed text bounds but fall back to the fx bounds instead. Which are also wrong: svgWriterProcessor.js
We probably need to check textBounds and fx bounds and either take the bigger area, or even better take the union of both. |
I was able to figure out a bounds diffing scheme that seems to fix most of the cases we have... the ones that are not right are not too far off at least. I think there are bugs in the generator bounds, but I have not isolated them. Could be that we just need more info to know where the text is within the bounds they provide. |
Setting this to "testing" so that Joe can have a look. Its not going to be fixed/closed but it might not be as high priority now. |
The bounds are most definitely wrong. If I have a font size of 48px the bounds can not be 30px height. We have to talk with Generator and PS about that. |
@jhatwich It's definitely better than it was. It's still off a bit in places, especially with characters with ligatures that run below the baseline. We're not at parity with extract or jsx, but if there's no time to get the rest of it fixed, we can live with it. Of course if we can get another fix in the time we have, I'll take it. :) |
In the test file, all looks good in Crema preview. But when you generate svg, most layers show clipping on the right side - some just a bit, and a few show quite a bit of clipping. Removing testing label. |
Test file: http://adobe.ly/1nP7VtN
Result: Text is offset or clipped when there are layer fx. Bevel & emboss doesn't render at all (for shapes, it renders without the fx).
The text was updated successfully, but these errors were encountered: