From f4db38aadfd3a4f13cb72736de28acfaa15d648b Mon Sep 17 00:00:00 2001 From: Jonas Jenwald <jonas.jenwald@gmail.com> Date: Sun, 5 Aug 2018 10:33:56 +0200 Subject: [PATCH] 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 --- src/core/fonts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/fonts.js b/src/core/fonts.js index aff4ac513..a94cc510a 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -680,7 +680,8 @@ var Font = (function FontClosure() { function isTrueTypeFile(file) { var header = file.peekBytes(4); - return readUint32(header, 0) === 0x00010000; + return (readUint32(header, 0) === 0x00010000 || + bytesToString(header) === 'true'); } function isTrueTypeCollectionFile(file) {