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

Unified Diff: third_party/ots/src/metrics.cc

Issue 1487543005: Update OTS to revision 99a3b7f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « third_party/ots/src/layout.cc ('k') | third_party/ots/src/name.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/src/metrics.cc
diff --git a/third_party/ots/src/metrics.cc b/third_party/ots/src/metrics.cc
index 579d0bd1e75b43642698a72d4cc644a8a91ca239..cd89f45559ad0c24e70861c714323aad2a6eb86d 100644
--- a/third_party/ots/src/metrics.cc
+++ b/third_party/ots/src/metrics.cc
@@ -125,23 +125,6 @@ bool ParseMetricsTable(const ots::Font *font,
if (!table->ReadU16(&adv) || !table->ReadS16(&sb)) {
return OTS_FAILURE_MSG("Failed to read metric %d", i);
}
-
- // This check is bogus, see https://github.com/khaledhosny/ots/issues/36
-#if 0
- // Since so many fonts don't have proper value on |adv| and |sb|,
- // we should not call ots_failure() here. For example, about 20% of fonts
- // in http://www.princexml.com/fonts/ (200+ fonts) fails these tests.
- if (adv > header->adv_width_max) {
- OTS_WARNING("bad adv: %u > %u", adv, header->adv_width_max);
- adv = header->adv_width_max;
- }
-
- if (sb < header->min_sb1) {
- OTS_WARNING("bad sb: %d < %d", sb, header->min_sb1);
- sb = header->min_sb1;
- }
-#endif
-
metrics->entries.push_back(std::make_pair(adv, sb));
}
@@ -152,17 +135,6 @@ bool ParseMetricsTable(const ots::Font *font,
// Some Japanese fonts (e.g., mona.ttf) fail this test.
return OTS_FAILURE_MSG("Failed to read side bearing %d", i + num_metrics);
}
-
- // This check is bogus, see https://github.com/khaledhosny/ots/issues/36
-#if 0
- if (sb < header->min_sb1) {
- // The same as above. Three fonts in http://www.fontsquirrel.com/fontface
- // (e.g., Notice2Std.otf) have weird lsb values.
- OTS_WARNING("bad lsb: %d < %d", sb, header->min_sb1);
- sb = header->min_sb1;
- }
-#endif
-
metrics->sbs.push_back(sb);
}
« no previous file with comments | « third_party/ots/src/layout.cc ('k') | third_party/ots/src/name.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698