Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: third_party/woff2/src/font.cc

Issue 1873123002: Update woff2 to 4e698b8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: assert.h Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/woff2/src/font.cc
diff --git a/third_party/woff2/src/font.cc b/third_party/woff2/src/font.cc
index 5b4bbe60abf52fb97b37f85a17a3efde97e03875..b2228e39da5285f434699334934b0d3e4d61e997 100644
--- a/third_party/woff2/src/font.cc
+++ b/third_party/woff2/src/font.cc
@@ -49,11 +49,7 @@ std::vector<uint32_t> Font::OutputOrderedTags() const {
output_order.push_back(table.tag);
}
- // Alphabetize and do not put loca immediately after glyf
- // This violates woff2 spec but results in a font that passes OTS
- std::sort(output_order.begin(), output_order.end());
- // TODO(user): change to match spec once browsers are on newer OTS
- /*
+ // Alphabetize then put loca immediately after glyf
auto glyf_loc = std::find(output_order.begin(), output_order.end(),
kGlyfTableTag);
auto loca_loc = std::find(output_order.begin(), output_order.end(),
@@ -62,7 +58,7 @@ std::vector<uint32_t> Font::OutputOrderedTags() const {
output_order.erase(loca_loc);
output_order.insert(std::find(output_order.begin(), output_order.end(),
kGlyfTableTag) + 1, kLocaTableTag);
- }*/
+ }
return output_order;
}
@@ -79,6 +75,7 @@ bool ReadTrueTypeFont(Buffer* file, const uint8_t* data, size_t len,
std::map<uint32_t, uint32_t> intervals;
for (uint16_t i = 0; i < font->num_tables; ++i) {
Font::Table table;
+ table.flag_byte = 0;
table.reuse_of = NULL;
if (!file->ReadU32(&table.tag) ||
!file->ReadU32(&table.checksum) ||

Powered by Google App Engine
This is Rietveld 408576698