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

Unified Diff: src/vmtx.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/vhea.cc ('k') | src/vorg.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vmtx.cc
diff --git a/src/vmtx.cc b/src/vmtx.cc
old mode 100644
new mode 100755
index 04761aba35c2c81ddcfdde3586405bc9526f5b8a..e29d32b29f9b55de3a76727a2d0af75f656b860d
--- a/src/vmtx.cc
+++ b/src/vmtx.cc
@@ -9,7 +9,9 @@
#include "vhea.h"
// vmtx - Vertical Metrics Table
-// http://www.microsoft.com/opentype/otspec/vmtx.htm
+// http://www.microsoft.com/typography/otspec/vmtx.htm
+
+#define TABLE_NAME "vmtx"
namespace ots {
@@ -19,12 +21,12 @@ bool ots_vmtx_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
file->vmtx = vmtx;
if (!file->vhea || !file->maxp) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("vhea or maxp table missing as needed by vmtx");
}
- if (!ParseMetricsTable(&table, file->maxp->num_glyphs,
+ if (!ParseMetricsTable(file, &table, file->maxp->num_glyphs,
&file->vhea->header, &vmtx->metrics)) {
- return OTS_FAILURE();
+ return OTS_FAILURE_MSG("Failed to parse vmtx metrics");
}
return true;
@@ -38,8 +40,8 @@ bool ots_vmtx_should_serialise(OpenTypeFile *file) {
}
bool ots_vmtx_serialise(OTSStream *out, OpenTypeFile *file) {
- if (!SerialiseMetricsTable(out, &file->vmtx->metrics)) {
- return OTS_FAILURE();
+ if (!SerialiseMetricsTable(file, out, &file->vmtx->metrics)) {
+ return OTS_FAILURE_MSG("Failed to write vmtx metrics");
}
return true;
}
@@ -50,3 +52,4 @@ void ots_vmtx_free(OpenTypeFile *file) {
} // namespace ots
+#undef TABLE_NAME
« .gitmodules ('K') | « src/vhea.cc ('k') | src/vorg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698