prawnpdf/ttfunk

Subset object fails to encode if table data is empty

mojavelinux opened this issue · 2 comments

If the data in one of the tables is empty, the Subset object fails to encode. This bug was introduced when the checksum method was rewritten prior to 1.5.0.

See 129d423#diff-45b279937f00663adf564be8dead1e57L126

The method no longer accounts for a zero-length string. When the string is empty, the method returns false instead of 0.

This bug causes ttfunk to crash when working with many fonts. As a result, Prawn is unusable.

This is fixed in 1.5.1.