You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Corrupted CFF index data
There was a subtle bug in CFF Index implementation that resulted in
a data corruption. In certain circumstances some items didn't get
properly encoded. This happened when items were not previously accessed.
This resulted, for instance, in missing glyphs. But only sometimes
because indexes might've still contain data that shouldn't've been
there. In combination with incorrect encoding (see further) this
resulted in some glyphs still being rendered, sometimes even correctly.
Along with the fix a rather large API change landed. This resulted in
quite a big diff.
## Incorrect CFF encoding in subsets
TTFunk used to reuse encoding from the original font. This mapping was
incorrect for subset fonts which used not just a subset of glyphs but
also a different encoding.
A separate issue was that some fonts have empty CFF encoding. This
incorrect mapping resulted in encoding that mapped all codes to glyph 0.
This had impact on Prawn in particular. PDF spec explicitly says that
CFF encoding is not to be used in OpenType fonts. `cmap` table should
directly index charstrings in the CFF table. Despite this PDF renderers
still use CFF encoding to retrieve glyphs. So TTFunk has to discard the
original CFF encoding and supply its own.
0 commit comments