I'm really exited about the copy css feature. It helps me, a web developer, to get most of the font styles, gradients and rounded corners out of a psd in no time.

I have however an problem. Sometimes, designers instead of increasing the font size by incrementing the font size, they start a transform by cmd+clicking on a corner of the text area and alt+drag it to change the size of the font.

This messes up the resulting css. Instead of getting the actual font size that results after the resizing operation, we get a translate matrix property which is kinda useless when working on a blog or something like that.

Is there a way to force the transformed text to report its real value in px/pt instead of the original + the transformed property?

  • If the transform "a" and "d" values are nearly identical, you can simply multiply the original font size by those values and get pretty close to the final size, usually with a lot of decimal noise. E.g., font-size: 11.515px with transform: matrix(1.30267542563594, 0, 0, 1.30267542563593, 0, 0). 1.30267542563594 x 11.515px results in 15.0003075262px, and the final value in the PSD itself is actually 15px. YMMV! – cfx Mar 11 '19 at 3:12

It seems like once Photoshop locks onto a transform, it never lets go of it (at least in the currently released versions).

The CSS starts with the original font size, and Photoshop reports the effective (post-transform) font size, but you can't clear the transform from the CSS by reverting the type to its original size (as reported in the CSS), then manually assigning it the final design point size. For no reasonable reasons, this retains the transform matrix and now reports a scaled-down "original" size.

Since Photoshop has no way to clear transformations, the only real workaround is to copy the text, create a new (point or area) text field and paste, then change the size to the reported point size of your original. Move the new text exactly over the old and delete the old layer.

And tell your designers "Don't do that."

This really is a bug, and I've reported it as such, although I suspect it's "as designed" because of the way Ps handles its data internally.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.