mirror of
http://git.mos6581.com/ManchildProductions/Male-Poon.git
synced 2026-05-26 16:55:20 +00:00
OTS: Do not drop vhea/vmtx when GSUB does not exist.
This commit is contained in:
+1
-5
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user