Font generator for typeface

Hi, so I have created a typeface and I want to know how I can create a font generator for it on a website, so the user will type in any text and it will generate what it would look like and be able to download it. Can anyone tell me if there’s simple code out there for this?

I would apply this font-family to the <p> or <div> in which You intend to put the input where user can type and check selected typeface.