Don't check font format by file extension

This commit is contained in:
Devon Govett 2014-11-27 23:23:55 -08:00
parent 7a2f2d243c
commit 1df8ba579b

View File

@ -6,8 +6,7 @@ class PDFFont
if StandardFont.isStandardFont src
return new StandardFont document, src, id
if /\.(ttf|otf|ttc|dfont)$/i.test src
font = fontkit.openSync src, family
font = fontkit.openSync src, family
else if Buffer.isBuffer(src)
font = fontkit.create src, family