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

Unified Diff: src/hhea.cc

Issue 658573004: Updating to new OTS repo from https://github.com/khaledhosny/ots.git (Closed) Base URL: https://chromium.googlesource.com/external/ots@master
Patch Set: Adding Colored Emoji changes from external/git repo Created 6 years, 2 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
« .gitmodules ('K') | « src/head.cc ('k') | src/hmtx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hhea.cc
diff --git a/src/hhea.cc b/src/hhea.cc
old mode 100644
new mode 100755
index 0342ba5bcb34fd1a2d665d7bb07f89126a28301c..8430442d8ef624c1ffc4dcb8512aac68fb05e99b
--- a/src/hhea.cc
+++ b/src/hhea.cc
@@ -8,7 +8,9 @@
#include "maxp.h"
// hhea - Horizontal Header
-// http://www.microsoft.com/opentype/otspec/hhea.htm
+// http://www.microsoft.com/typography/otspec/hhea.htm
+
+#define TABLE_NAME "hhea"
namespace ots {
@@ -18,14 +20,14 @@ bool ots_hhea_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
file->hhea = hhea;
if (!table.ReadU32(&hhea->header.version)) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Failed to read hhea version");
}
if (hhea->header.version >> 16 != 1) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Bad hhea version of %d", hhea->header.version);
}
if (!ParseMetricsHeader(file, &table, &hhea->header)) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Failed to parse horizontal metrics");
}
return true;
@@ -36,8 +38,8 @@ bool ots_hhea_should_serialise(OpenTypeFile *file) {
}
bool ots_hhea_serialise(OTSStream *out, OpenTypeFile *file) {
- if (!SerialiseMetricsHeader(out, &file->hhea->header)) {
- return OTS_FAILURE();
+ if (!SerialiseMetricsHeader(file, out, &file->hhea->header)) {
+ return OTS_FAILURE_MSG("Failed to serialise horizontal metrics");
}
return true;
}
@@ -47,3 +49,5 @@ void ots_hhea_free(OpenTypeFile *file) {
}
} // namespace ots
+
+#undef TABLE_NAME
« .gitmodules ('K') | « src/head.cc ('k') | src/hmtx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698