'Is there a way to make font-family changeable for whole website using a button?

I am tasked with creating a brand style guide generator, using html, css, js and frameworks that are supported, that will let users change anything on brand style guide, that being, colours, typography, remove or add paragraphs, headings, etc... You get the point..

So basically I figured out most of the things, but I am still stuck on if I can let a user upload a .ttf file, or the so called "Font extension" and then by saving, that font is the one being used throughout the whole brand style guide.

If there's a way, could I get a brief explanation on how it would work, I will figure it out after that eventually.

If not, I am happy to hear your suggestions :) For now I have thought of having a choice of 6 typefaces as templates, otherwise, just add it in code.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source