hmtx optimization decoding. never encodes hmtx optimized as yet; need a cli param.
This commit is contained in:
+5
-5
@@ -78,11 +78,6 @@ bool ReadGlyph(const uint8_t* data, size_t len, Glyph* glyph) {
|
||||
return FONT_COMPRESSION_FAILURE();
|
||||
}
|
||||
|
||||
if (num_contours == 0) {
|
||||
// Empty glyph.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Read the bounding box.
|
||||
if (!buffer.ReadS16(&glyph->x_min) ||
|
||||
!buffer.ReadS16(&glyph->y_min) ||
|
||||
@@ -91,6 +86,11 @@ bool ReadGlyph(const uint8_t* data, size_t len, Glyph* glyph) {
|
||||
return FONT_COMPRESSION_FAILURE();
|
||||
}
|
||||
|
||||
if (num_contours == 0) {
|
||||
// Empty glyph.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (num_contours > 0) {
|
||||
// Simple glyph.
|
||||
glyph->contours.resize(num_contours);
|
||||
|
||||
Reference in New Issue
Block a user