| Index: src/hmtx.cc
|
| diff --git a/src/hmtx.cc b/src/hmtx.cc
|
| old mode 100644
|
| new mode 100755
|
| index ea7491d2e38c02fef239ad91941706c30368f4e1..ae86513196a86a33f30850d0a2bb2dc598968700
|
| --- a/src/hmtx.cc
|
| +++ b/src/hmtx.cc
|
| @@ -8,7 +8,9 @@
|
| #include "maxp.h"
|
|
|
| // hmtx - Horizontal Metrics
|
| -// http://www.microsoft.com/opentype/otspec/hmtx.htm
|
| +// http://www.microsoft.com/typography/otspec/hmtx.htm
|
| +
|
| +#define TABLE_NAME "hmtx"
|
|
|
| namespace ots {
|
|
|
| @@ -18,12 +20,12 @@ bool ots_hmtx_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
|
| file->hmtx = hmtx;
|
|
|
| if (!file->hhea || !file->maxp) {
|
| - return OTS_FAILURE();
|
| + return OTS_FAILURE_MSG("Missing hhea or maxp tables in font, needed by hmtx");
|
| }
|
|
|
| - if (!ParseMetricsTable(&table, file->maxp->num_glyphs,
|
| + if (!ParseMetricsTable(file, &table, file->maxp->num_glyphs,
|
| &file->hhea->header, &hmtx->metrics)) {
|
| - return OTS_FAILURE();
|
| + return OTS_FAILURE_MSG("Failed to parse hmtx metrics");
|
| }
|
|
|
| return true;
|
| @@ -34,8 +36,8 @@ bool ots_hmtx_should_serialise(OpenTypeFile *file) {
|
| }
|
|
|
| bool ots_hmtx_serialise(OTSStream *out, OpenTypeFile *file) {
|
| - if (!SerialiseMetricsTable(out, &file->hmtx->metrics)) {
|
| - return OTS_FAILURE();
|
| + if (!SerialiseMetricsTable(file, out, &file->hmtx->metrics)) {
|
| + return OTS_FAILURE_MSG("Failed to serialise htmx metrics");
|
| }
|
| return true;
|
| }
|
| @@ -45,3 +47,5 @@ void ots_hmtx_free(OpenTypeFile *file) {
|
| }
|
|
|
| } // namespace ots
|
| +
|
| +#undef TABLE_NAME
|
|
|