Hey,
I want to include a custom font in a custom html element.
Is there any way I can get the font url, where my font is hosted, like I can do it for images (for example https://static.wixstatic.com/media/…~mv2.jpg) ?
Another way would be to link the font over fonts.googleapis.com, but that’s due the privacy policy not possible.
Okay, I could solve it, so here’s a documentation how you can get the urls:
Upload your font in WIX custom fonts and use it for any text element in the editor, then publish the site (we want WIX to import your font to the live site from the server).
Go to your live site and open the console and go to elements, here you can see the full HTML of your site. Then search (srg + f) for “@font-face”.
There can be multiple result, for most it’s a big yellow block like in this example:
Copy the style Tag and paste it in a code editor.
In the code editor you can search for your font:
Just copy the url and replace //static… with https://static…
For some reasons WIX imports your font like 20 times with 10 different links. I really don’t know why, but if your url isn’t working, you should try a different url.
Now you have the url of your font and you can use it in your HTML.
Hope this guide was usefull
This does not work, I tried searching the entire source of my site for font-face that has anything to do with my fonts and found nothing. Instead any text you add to your site with the custom font you uploaded will have something like this in the font-family property: wfont_7035ab_7610c9580ddb4dbea62394d6ab1d59ee,wf_7610c9580ddb4dbea62394d6a,orig_pt_sans_narrow_bold
This cannot be used in custom elements.