hmtx optimization decoding. never encodes hmtx optimized as yet; need a cli param.

This commit is contained in:
Rod Sheeter
2016-01-20 14:10:02 -08:00
parent db0448815a
commit c817c969bf
9 changed files with 447 additions and 55 deletions
+5 -5
View File
@@ -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);