Search code examples
cssphotoshopfont-sizepsd

Wrong CSS font size in CSS Hat and Parfait


CSS Hat and Adobe Project Parfait are getting font size incorrectly from a PSD.

Screenshots:

CSS Hat

enter image description here

Parfait

enter image description here

It can't be because of my Photoshop settings, since Parfait isn't doing it correctly either. What could cause such problem?

Edit: I think I've found the source of the problem. When you scale the size of the layer with the font up, the value that CSS Hat and Parfait get doesn't change, so that means that they use the original font size and the actual size that is displayed on the screen. Any way around this? Maybe it's the wrong site to ask such question?


Solution

  • Yes, you are totally right. The font properties detection mechanism is not a simple thing to do with the provided APIs. There are multiple reasons for it, including the one you mentioned. Unfortunately, we do not have documented this issue in detail, so there is no quick workaround. By the way, which version are you using? Maybe upgrading to CSS Hat 2 could help. It has been completely rewritten. Full disclosure: I am CSS Hat dev.