How cross-browser you to plug in custom font on a website using CSS?

The customer wants the font Franklin Gothic Demi Cond
@font-face {
 font-family: "Franklin Gothic Demi Cond";
 src: url("/project/fonts/Franklin.eot");
}
@font-face {
 font-family: "Franklin Gothic Demi Cond";
 src: url("/project/fonts/Franklin.ttf");
}

This option will be cross-browser or need something else to prescribe?
and how will this work for Android?

maybe somewhere there is about it a good article?

Thank you all in advance)
Have a good day and adequate customer!
June 26th 19 at 14:10
3 answers
June 26th 19 at 14:12
Solution
: The answer is quite on topic. Take your font to fill up any generator (in those that I have or any other) it generates all the necessary font formats and a css file which defines the connection, it remains only to extract the generated fonts to your project and copy the connection in your css file. - Noe_Hermann6 commented on June 26th 19 at 14:15
June 26th 19 at 14:14
I do not insist on correctness but :
@font-face{
 font-family: OpenSansBold;
 src: url("../fonts/OpenSans/OpenSansBold/OpenSansBold.eot?#iefix") format("embedded-opentype"),
 url("../fonts/OpenSans/OpenSansBold/OpenSansBold.woff") format("woff"),
 url("../fonts/OpenSans/OpenSansBold/OpenSansBold.ttf") format("truetype");
}

body{
 font-family: OpenSansBold;
}
June 26th 19 at 14:16
The easiest option - https://www.fontsquirrel.com/tools/webfont-generator
  • Very powerful generator setfov steep for a site with a bunch of settings. For example, you can choose a table with only the desired characters (if you for example only need the numbers and font that it saves weight). + generates the so-called bullet-proof code that works cross-browser maximum.
  • The main drawback FontSquirrel - many fonts there is banned, as it believes you are loading a pirated font.



Another option, take the Bulletproof @font-face Syntax and convert the fonts themselves. Even today it is possible to get a WOFF font: caniuse.com/#search=woff
: as you say, but in the second paragraph I gave a link to the article: https://www.paulirish.com/2009/bulletproof-font-fa... - this is it. A bulletproof connection. - Noe_Hermann6 commented on June 26th 19 at 14:19
: article SEP 4TH, 2009, like 8 years ago written - Rex.Bayer90 commented on June 26th 19 at 14:22
The main drawback FontSquirrel - many fonts there is banned, as it believes you are loading a pirated font.
That's why I use fontie, he do not care what you feed him - Etha_Bro commented on June 26th 19 at 14:25
: and what, you think something changed? If you are supporting IE8+ is all the same. - Noe_Hermann6 commented on June 26th 19 at 14:28

Find more questions by tags CSS