OTS: Do not drop vhea/vmtx when GSUB does not exist.

This commit is contained in:
Pale Moon
2016-10-17 23:23:35 +02:00
parent fe0a6c859c
commit efe6b8c4f1
2 changed files with 3 additions and 10 deletions
+1 -5
View File
@@ -4,7 +4,6 @@
#include "vhea.h"
#include "gsub.h"
#include "head.h"
#include "maxp.h"
@@ -35,10 +34,7 @@ bool ots_vhea_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
bool ots_vhea_should_serialise(OpenTypeFile *file) {
// vhea should'nt serialise when vmtx doesn't exist.
// Firefox developer pointed out that vhea/vmtx should serialise iff GSUB is
// preserved. See http://crbug.com/77386
return file->vhea != NULL && file->vmtx != NULL &&
ots_gsub_should_serialise(file);
return file->vhea != NULL && file->vmtx != NULL;
}
bool ots_vhea_serialise(OTSStream *out, OpenTypeFile *file) {
+2 -5
View File
@@ -4,7 +4,6 @@
#include "vmtx.h"
#include "gsub.h"
#include "maxp.h"
#include "vhea.h"
@@ -31,10 +30,8 @@ bool ots_vmtx_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
}
bool ots_vmtx_should_serialise(OpenTypeFile *file) {
// vmtx should serialise when vhea and GSUB are preserved.
// See the comment in ots_vhea_should_serialise().
return file->vmtx != NULL && file->vhea != NULL &&
ots_gsub_should_serialise(file);
// vmtx should serialise when vhea is preserved.
return file->vmtx != NULL && file->vhea != NULL;
}
bool ots_vmtx_serialise(OTSStream *out, OpenTypeFile *file) {