Update the TrueType font file detection to also recognize the Mac specific header 'true'
Please refer to the TrueType specification: https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html#ScalerTypeNote
This commit is contained in:
parent
444976bcd5
commit
f4db38aadf
@ -680,7 +680,8 @@ var Font = (function FontClosure() {
|
|||||||
|
|
||||||
function isTrueTypeFile(file) {
|
function isTrueTypeFile(file) {
|
||||||
var header = file.peekBytes(4);
|
var header = file.peekBytes(4);
|
||||||
return readUint32(header, 0) === 0x00010000;
|
return (readUint32(header, 0) === 0x00010000 ||
|
||||||
|
bytesToString(header) === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTrueTypeCollectionFile(file) {
|
function isTrueTypeCollectionFile(file) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user