iamcal / emoji-data

Easy to parse data and spritesheets for emoji
MIT License
2.57k stars 306 forks source link

All 64x64 sprite sheets are wrong size #135

Closed jhuckaby closed 5 years ago

jhuckaby commented 6 years ago

Hello,

I noticed that all your 64x64 sprite sheet images are 3432 x 3432 pixels in size. This resolution is not evenly divisible by 64. It divides to 53.625. Something isn't right here...

If the individual emoji are supposed to be 64x64 pixels, and you have 52 rows and 52 columns in the sheet, then the total resolution should be 3328 x 3328, not 3432 x 3432.

It looks like your Emoji are actually a bit bigger than 64px. I believe they are 66x66 pixels each. Did you add a pixel of padding on all sides or something?

jhuckaby commented 6 years ago

For the record, I think having a little padding is a good thing, especially when trying to scale the sheet down and pick out a single Emoji for display. I was just confused because nothing divided evenly when basing my math on 64px. I think if the 2px of padding is as designed, then please keep it, and just maybe update the docs or add a note somewhere, so people understand that the sprites are actually 66px, not 64px.

Shimmi commented 6 years ago

Hi @jhuckaby, There is a 1px padding on all sides of each emoji. As you correctly pointed out, there is a total of 52 rows and 52 columns.

Thus: 52 * (64px + 2px) = 3432px

fdebijl commented 6 years ago

Late bump, but if you go to /build/build_image.php, and set $space = 1; to $space = 0; on line 51, the resulting sheets will not contain any padding from what I can tell.

jhuckaby commented 6 years ago

@Fdebijl Ah thank you, that is good to know.

kolosovsky commented 4 years ago

It is very confusing! It is supposed to be documented