Embed font in javascript

Is there a way to insert a font into html / javascript code? (all in 1 html file)

+3
source share
1 answer

I think Cufón might be your best bet. Its font converter turns OTF, TTF, PFB and PostScript fonts into JavaScript. You can also restrict converted fonts to specific subsets of glyphs to reduce file size. Read more here:

https://github.com/sorccu/cufon/wiki/about

JavaScript ( ), <script> HTML.

+1

Source: https://habr.com/ru/post/1750851/


All Articles