Mismatch in number of glyphs between the "hmtx" table and the "cff" table.

For some reason i’m getting this error on some Font Bakery QA tests.

From what I can check, Glyphs should be counting 532 and I just get 493 on the hhea table.

I believe it is related with the comb glyphs, but I can’t figure why this is happening. Glyph names and unicodes are correct.

What may be the issue?

It means that the last glyphs all have the same width. Only the first one of those needs to have an entry in the hmtx (horizontal metrics) table. It’s not really an error.

I wasn’t aware that the “Recommendations” appendix to the OpenType spec says that

OpenType fonts that include CFF data must set numberOfHMetrics equal to the number of glyphs in the font and therefore cannot use the “repeat last width” optimization normally available within the ‘hmtx’ table.

If that’s the case, Glyphs should enforce that the hmtx table (and hhea.numberOfHMetrics) is written according to the recommendations. But maybe it’s not really a problem, and the recommendations are too strict or outdated?

In any case, @FranciscoTorres if you add a glyph at the end of the font that has a different width than the next-to-last glyph, the issue should be avoided.

1 Like

Good to know. I’ll fix it.

Thanks @jkutilek . It works.

It’s strange because i’m used to export a lot of projects with this glyphOrder and never had this Fail in the past. Maybe it’s from the Glyphs version idk.

@GeorgSeifert FYI it was Glyphs 3.5 (3532).