Stop trusting header totalSfntSize and glyf origLength

This commit is contained in:
Rod Sheeter
2016-03-08 12:30:08 -08:00
parent 643c7b4589
commit b220918cab
12 changed files with 726 additions and 526 deletions
+6
View File
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <inttypes.h>
#include "./woff2_out.h"
namespace woff2 {
@@ -31,6 +32,11 @@ size_t ComputeWOFF2FinalSize(const uint8_t *data, size_t length);
bool ConvertWOFF2ToTTF(uint8_t *result, size_t result_length,
const uint8_t *data, size_t length);
// Decompresses the font into out. Returns true on success.
// Works even if WOFF2Header totalSfntSize is wrong.
bool ConvertWOFF2ToTTF(const uint8_t *data, size_t length,
WOFF2Out* out);
} // namespace woff2
#endif // WOFF2_WOFF2_DEC_H_