For compatibility with older browsers, I recommend using both woff2 and woff:
Chrome Safari Firefox Opera IE Android iOS
5+ 5.1+ 3.6+ 11.50+ 9+ 4.4+ 5.1+
Pro Tip: Keep the FontFamilyName consistent across all font weights when defining @font-face rules. It simplifies CSS management.
@font-face {
font-family: 'FontFamilyName';
src: url('../fonts/FontFileName.woff2') format('woff2'),
url('../fonts/FontFileName.woff') format('woff');
font-weight: 400;
}
@font-face {
font-family: 'FontFamilyName';
src: url('../fonts/FontFileName-Bold.woff2') format('woff2'),
url('../fonts/FontFileName-Bold.woff') format('woff');
font-weight: 700;
}
Include a fallback font stack to support browsers that do not recognize woff or web fonts (such as some versions of LG browsers).
h1 { font: 700 2rem 'FontFamilyName', sans-serif; }
p { font: 400 1rem 'FontFamilyName', sans-serif; }
strong { font-weight: 700; }