Stop trusting header totalSfntSize and glyf origLength
This commit is contained in:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user