After downloading the font, you will see some files with .ttf, .otf extension, among others. Adds these files to the project folder, usually I paste them into public / fonts.
To add and use the source in the code we use @font-face
, this is known with importing source:
@font-face {
font-family: "NomeDaFonte;
src: url("arquivo-fote.otf");
}
In the font-family
tag you enter the name that you will use.
In the second tag src
you put the location where the downloaded files are located.
Now to add in a div
specifies:
.minha-div{
font-family: "NomeDaFonte";
}