joypixels / emojione

[Archived] The world's largest independent emoji font. Maintained at https://github.com/joypixels/emoji-toolkit.
https://www.joypixels.com
Other
4.46k stars 533 forks source link

CLBC table has mismatching ppem x and y fields leading to glyph overlap #218

Closed fdwr closed 8 years ago

fdwr commented 8 years ago

The CBLC table (in the Android export) has ppem fields set to 106 when the actual bitmap assets are 128x128. This leads to glyph overlap when rendering because the em box from the head table is 1000, and the advances from the hmtx table are 1000, but when displayed at 128 ppem, you get 1.2x overscaling (128 / 106).

emojionecblctableppemvalues

Assets:

emojionepngassets

Top row is the sbix font (looks good). The bottom row is the CBDT font, with glyph overlap:

emojionecbdtoverlap

Changing the bitmap size table ppem fields to 128 fixes the issue:

emojionecbdtoverlapfixed

*Interestingly there are some differences between the latest available sbix vs latest CBDT font, including the hair color of the boy in the boat and the penguin's eye size, but I assume that one file is just newer than the other.

miguelsousa commented 8 years ago

The font uses 106 instead of 128 because of issue #166.

Where is this overlapping happening?

The differences between the Android and the Apple fonts is because the former has been updated with the 2016 Q1 changes (#193) whereas the latter has not.

mikebe11 commented 8 years ago

closing this based on the merge of PR #225

Jolg42 commented 8 years ago

Hi @fdwr, I can see you used 010 Editor with an "OpenTypeTemplate.bt" but I can't find it… Is it available somewhere? πŸ˜‰

fdwr commented 8 years ago

@Jolg42: you are welcome to use it. http://pikensoft.com/programs/OpenTypeTemplate.bt

(I never bothered uploading it anywhere until just now because it was mainly useful to me).

Jolg42 commented 8 years ago

Thank you @fdwr πŸ™ I think that can help more people who are also manipulating OpenType fonts!

Ping: @fdb @fpirsch @brawer @moyogo @Pomax @miguelsousa @davelab6 @graphicore @louisremi @FranzPoize @ghenania

Here is 010 Editor website : http://www.sweetscape.com/010editor/ With the OpenTypeTemplate.bt from @fdwr in the precedent comment it's really easy read & write in binary directly now :)

FranzPoize commented 8 years ago

Fuck yeah that is awesome. Thanks!