I have a font file and not a link for the font. How can i upload that to get a link and inject the css.

  • phonefixers
    Asked on February 22, 2017 at 6:10 AM
    I have a font file and not a link for the font. How can i upload that to get a link and inject the css.
  • liyam
    Replied on February 22, 2017 at 8:01 AM

    Hello phonefixers,

    You can upload your .ttf or .wof file to any webhost which you may have access to and use CSS to access it using CSS like this:

    @font-face {
       font-family: "My Font";
       src: url(http://www.mydomain.com/myfont.ttf) format("truetype");
    }

    .myclass {
        font-family: "My Font", Verdana, Tahoma;
    }

    Perhaps, Google has a font of that you would like to upload. And if so, you can just use Google fonts instead and use this guide: https://www.jotform.com/help/100-How-to-Use-Google-Fonts-in-your-Form

    If you have additional questions or if you need clarification please let us know.

  • phonefixers
    Replied on February 22, 2017 at 9:56 AM

    @font-face {

    font-family: wf_4d3a90dcfb724028b0f1f2d85;

    src: url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/woff/file.woff") format("woff"),

    url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/woff2/file.woff2") format("woff2"),

    url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/ttf/file.ttf") format("ttf");

    }

     

    .myclass { 
        font-family: " wf_4d3a90dcfb724028b0f1f2d85", Verdana, Tahoma;

     not working

     

  • David JotForm Support
    Replied on February 22, 2017 at 12:58 PM

    I tested with your code and applied it to a form and it looks to be working:

    @font-face {

    font-family: wf_4d3a90dcfb724028b0f1f2d85;

    src: url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/woff/file.woff") format("woff"),

    url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/woff2/file.woff2") format("woff2"),

    url("https://static.wixstatic.com/ufonts/1ea323_4d3a90dcfb724028b0f1f2d8510d7374/ttf/file.ttf") format("ttf");

    }

    .myclass {
        font-family: " wf_4d3a90dcfb724028b0f1f2d85", Verdana, Tahoma;
    }


    .form-all{

    font-family: " wf_4d3a90dcfb724028b0f1f2d85", Verdana, Tahoma;

    }


    Make sure to add the highlighted part to apply the font to the form.