Best option:
- Just go to https://fonts.google.com/
- Add font by clicking +
- Go to selected font > Embed > @IMPORT > copy url and paste in your .css file above body tag.
- It’s done.
Second Option:
<link rel=”stylesheet” href=”//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&lang=en” />
Third Option
Looks like this one not a recommended.
Place @import at the very first line of the CSS file:
@import url(https://fonts.googleapis.com/css?family=Open+Sans);
body{
font-family: ‘Open Sans’,serif;
}
Forth Option
- You can also use @font-face to link to the URLs.
- http://www.css3.info/preview/web-fonts-with-font-face/
Fifth Option:
Download the font ttf/other format files, then simply add this CSS code example:
@font-face {
font-family: roboto-regular;
src: url(‘../font/Roboto-Regular.ttf’);
}
h2{
font-family: roboto-regular;
}