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

Unified Diff: src/vhea.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/vdmx.cc ('k') | src/vmtx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vhea.cc
diff --git a/src/vhea.cc b/src/vhea.cc
old mode 100644
new mode 100755
index b37b73a7f1f28ff8bf5e0e1d9a569e3d17623bb4..c689a834f0c19e7465b9c1e8fd315f6bfd349480
--- a/src/vhea.cc
+++ b/src/vhea.cc
@@ -9,7 +9,9 @@
#include "maxp.h"
// vhea - Vertical Header Table
-// http://www.microsoft.com/opentype/otspec/vhea.htm
+// http://www.microsoft.com/typography/otspec/vhea.htm
+
+#define TABLE_NAME "vhea"
namespace ots {
@@ -19,15 +21,15 @@ bool ots_vhea_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
file->vhea = vhea;
if (!table.ReadU32(&vhea->header.version)) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Failed to read version");
}
if (vhea->header.version != 0x00010000 &&
vhea->header.version != 0x00011000) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Bad vhea version %x", vhea->header.version);
}
if (!ParseMetricsHeader(file, &table, &vhea->header)) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Failed to parse metrics in vhea");
}
return true;
@@ -42,8 +44,8 @@ bool ots_vhea_should_serialise(OpenTypeFile *file) {
}
bool ots_vhea_serialise(OTSStream *out, OpenTypeFile *file) {
- if (!SerialiseMetricsHeader(out, &file->vhea->header)) {
- return OTS_FAILURE();
+ if (!SerialiseMetricsHeader(file, out, &file->vhea->header)) {
+ return OTS_FAILURE_MSG("Failed to write vhea metrics");
}
return true;
}
@@ -54,3 +56,4 @@ void ots_vhea_free(OpenTypeFile *file) {
} // namespace ots
+#undef TABLE_NAME
« .gitmodules ('K') | « src/vdmx.cc ('k') | src/vmtx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698