tweak to how index by offset is built

This commit is contained in:
Rod Sheeter
2015-02-25 09:22:45 -08:00
parent 4e48243b3a
commit 538b401b77
+4 -6
View File
@@ -304,18 +304,16 @@ bool ConvertTTFToWOFF2(const uint8_t *data, size_t length,
for (const auto tag : font.OutputOrderedTags()) {
const Font::Table& src_table = font.tables.at(tag);
if (src_table.IsReused()) {
continue;
}
if (index_by_offset.find(src_table.offset) == index_by_offset.end()) {
index_by_offset[src_table.offset] = tables.size();
} else if (!src_table.IsReused()) {
} else {
return false;
}
if (src_table.IsReused()) {
continue;
}
Table table;
table.tag = src_table.tag;
table.flags = 0;