I am getting these warnings in my custom built OpenType font.
WARNING: name: name records are not sorted.
WARNING: name: name records are not sorted.
My names are sorted like this:
nameRecords.sort(function(a, b) {
return ((a.platformID - b.platformID) ||
(a.encodingID - b.encodingID) ||
(a.languageID - b.languageID) ||
(a.nameID - b.nameID))
})
For some reason that's not actually resulting in sorting for the name records, which should be sorted by platformID, then by encodingID, then languageID, then finally nameID.
Wondering how to write the proper sorting function (in JavaScript) for the nameRecords array.