capsize
capsize copied to clipboard
Pass optional `postscriptName` parameter to fontkit
Currently passing .ttc files to fromFile
, fromBlob
or fromUrl
causes an error, because fontkit returns a Collection
instead of a Font
. I added an optional postscriptName
parameter which tells fontkit to return a specific font from the collection.
Here's an example usage:
const metrics = await fromFile('NotoSans.ttc', 'NotoSans');