There are 2 ways to add fonts.
First is you can use direct google fonts link. Below is the file path to add direct links in the xml file.
app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml
Below is the example.
<link rel="stylesheet" type="text/css" src="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900" src_type="url" />
Below has the second way to add fonts.
- Please Upload your fonts woff and woff2 in below path.
app/design/frontend/Vendor/Theme/web/fonts/
- After adding fonts in respected folder you have to include that fonts in css file like below :
app/design/frontend/Vendor/Theme/web/css/style.css
@font-face {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
src: url('../fonts/proxima_nova_semibold-webfont.eot');
src: url('../fonts/proxima_nova_semibold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/proxima_nova_semibold-webfont.woff2') format('woff2'),
url('../fonts/proxima_nova_semibold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
Also you can use fonts like below after inlucding in css.
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif';
Let me know still you facing any issue.
Thanks