How to embed a font on a website

I'm trying to embed my own font on my site, got a link to the link http://www.fontsquirrel.com/fontface/generator on this site after uploading the font to this site, it gives me this CSS:

@font-face {
    font-family: 'VoltaEFTU-Regular';
    src: url('voltaeftu-regular-webfont.eot');
    src: local('☺'),
    url('voltaeftu-regular-webfont.woff') format('woff'),
    url('voltaeftu-regular-webfont.ttf') format('truetype'),
    url('voltaeftu-regular-webfont.svg#webfonttKmU3jX8') format('svg');
    font-weight: normal;
    font-style: normal;
}

But it does not work on my machines. How can I embed a font on my website?

Thanks Mayur Matt

+3
source share
3 answers

If I did, I would see how the Google Font API works ...

+2
source

@font-facethe code looks right, but if you want to use this font example in <p>, you must use font-family: 'VoltaEFTU-Regular';in this element. Take a look at the generated demo.html file.

+1

Otherwise, you can download the fonts at www.1001fonts.com and install it in the "Fonts" located in the Windows folder. Then create a font using "transfonter.com" and use it on your website .. if you use the same font many times in the future, it is better to have this font in the default font list!

-3
source

Source: https://habr.com/ru/post/1747297/


All Articles