adambisek / string-pixel-width

Blazingly fast measure string width in pixels on the server in Javascript (Node.Js)
https://medium.com/@adambisek/text-pixel-width-measuring-on-javascript-backend-node-js-2b82bea97fab#.8ypyiffyw
MIT License
103 stars 41 forks source link

Guide for adding a new font? #3

Closed nsonnad closed 7 years ago

nsonnad commented 7 years ago

Hello! Thanks for this tool, I have been trying to solve this problem forever. I was wondering if you'd be able to provide some guidance on how to add a custom font, and maybe allow a kind of plugin system that allows you to pass in a custom font size map? If you can show me how to get the map, I'd be happy to submit a PR for the second part. Thanks!

adambisek commented 7 years ago

HI, I've added the guide for you - https://github.com/adambisek/string-pixel-width#how-to-contribute. Enjoy!

Have great day, Adam