Merge pull request #257 from pretzelfisch/master

added support for add font as Uint8Array
This commit is contained in:
Devon Govett 2014-07-29 09:36:57 -07:00
commit 314e9d28ae

View File

@ -33,6 +33,11 @@ class PDFFont
@font = TTFFont.fromBuffer src, family
@subset = new Subset @font
@registerTTF()
else if src instanceof Uint8Array
@font = TTFFont.fromBuffer (new Buffer src), family
@subset = new Subset @font
@registerTTF()
else
throw new Error 'Not a supported font format or standard PDF font.'