Add woff2 encoder/decoder support for overlapSimpleBitmap.
overlapSimpleBitmap is a new field in the transformed glyf table (https://www.w3.org/TR/WOFF2/#glyf_table_format). It allows the overlap simple flag set on glyphs in the original font to be saved into the woff2 encoding.
This commit is contained in:
@@ -26,8 +26,8 @@ struct WOFF2Params {
|
||||
|
||||
// Returns an upper bound on the size of the compressed file.
|
||||
size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length);
|
||||
size_t MaxWOFF2CompressedSize(const uint8_t* data, size_t length,
|
||||
const std::string& extended_metadata);
|
||||
size_t MaxWOFF2CompressedSize(const uint8_t *data, size_t length,
|
||||
const std::string &extended_metadata);
|
||||
|
||||
// Compresses the font into the target buffer. *result_length should be at least
|
||||
// the value returned by MaxWOFF2CompressedSize(), upon return, it is set to the
|
||||
|
||||
@@ -51,7 +51,7 @@ class WOFF2StringOut : public WOFF2Out {
|
||||
// Create a writer that writes its data to buf.
|
||||
// buf->size() will grow to at most max_size
|
||||
// buf may be sized (e.g. using EstimateWOFF2FinalSize) or empty.
|
||||
explicit WOFF2StringOut(std::string* buf);
|
||||
explicit WOFF2StringOut(std::string *buf);
|
||||
|
||||
bool Write(const void *buf, size_t n) override;
|
||||
bool Write(const void *buf, size_t offset, size_t n) override;
|
||||
@@ -59,7 +59,7 @@ class WOFF2StringOut : public WOFF2Out {
|
||||
size_t MaxSize() { return max_size_; }
|
||||
void SetMaxSize(size_t max_size);
|
||||
private:
|
||||
std::string* buf_;
|
||||
std::string *buf_;
|
||||
size_t max_size_;
|
||||
size_t offset_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user