I'm trying to add a font to my project, the issue is that I need to do everything from JS, how do I load a font from a .ttf file? since to apply the font-family I need the font to be already loaded (since apparently it only receives the name of the font as a parameter, not its absolute address).
I can think of 3 ways to dynamically load a font using
javascript
:link
and indicating thehref
to the file where the source is declared.style
and use@import
to load the source.style
and declaring the 'font-face' .