You can add custom fonts of your choice in WordPress by applying below simple steps.
Step 1: Download your fonts zip file/folder and unzip it.
Step 2: Look for the font files which will have formats like: .eot, .ttf/.otf, .woff, .woff2, .svg
Step 3: Upload this font files into your theme’s folder “assets/fonts/”
Step 4: Add below code to the style.css file under “wp-content/themes/your-theme/” folder
@font-face { font-family: 'font name'; src: url('assets/fonts/font-file.eot'); src: url('assets/fonts/font-file.eot?#iefix') format('embedded-opentype'), url('assets/fonts/font-file.woff') format('woff'), url('assets/fonts/font-file.ttf') format('truetype'), url('assets/fonts/font-file.svg#font-name') format('svg'); font-weight: normal; font-style: normal; }
NoteFor every font file available, add the path inside of url() data type. If you don’t have one of the formats such as .svg, just skip that line.
url('assets/fonts/font-file.eot')
Step 5: Replace font-family with your own name as shown below.
font-family: 'font name';