Open swampthang opened 7 years ago
Currently this module is just for looking up system fonts. I'd like to eventually add support for registering your own fonts.
Thanks for the reply. That would really be awesome. What's the best way to get metadata from a font file? Like a .ttf or .otf, etc
I'd love to be able to create some nice objects like you have:
{
family: "Cambria"
italic: true
monospace: false
path: "/Library/Fonts/Microsoft/Cambria Bold Italic.ttf"
postscriptName: "Cambria-BoldItalic"
style: "Bold Italic"
weight: 700
width: 5
}
Surely there's a way to do that in the meantime, huh?
That info can be extracted using fontkit.
Ahh, ok. The README didn't list all the items you include in your font object. I guess they're buried in there somewhere. Will check that out. Thanks!
Is there any way to only get fonts from the user's font directory? Getting all available fonts is way too much for this app. I didn't realize I had a few thousand.
Great library!
I'm wondering if there is a way to pull fonts from a custom directory. I'm working in an Electron app and have some fonts built in to the app. I like being able to get the metadata and the search feature in your library.