'How could I use local fonts in website

I want to show my business tagline in "monotype corsiva" font it is not available on Google font so any body can please help me out for it .



Solution 1:[1]

Paste all these font formates in your css folder otf/ttf/woff.

Add in your stylesheet:-

@font-face {
    font-family: 'MTCORSVA';
    src: url('./MTCORSVA.eot');
    src: local('MTCORSVA'), url('./MTCORSVA.woff') format('woff'), url('./MTCORSVA.ttf') format('truetype');
}

now use this to apply font family font-family: 'MTCORSVA';

Solution 2:[2]

You need to upload your font and then write the code in css to access that.

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

body {
  font-family: 'MyWebFont', Fallback, sans-serif;
}

In modern browsers you can only use .ttf file, so your font face code will be like:

@font-face {
      font-family: 'MyWebFont';
      src: url('webfont.ttf');
    }
    
    body {
      font-family: 'MyWebFont', Fallback, sans-serif;
    }

Make it correct answer if it resolve your problem. :)

Solution 3:[3]

First you have to locate the otf/ttf/woff font file on your local machine.

Then, put this into the css file.

@font-face {
    font-family: mylocalfont;
    src: url(fontname.woff);
}

body{
    font-family: mylocalfont;
}

Solution 4:[4]

http://fontsforweb.com/font/show?id=6771

Please log in or register to get your embedding links or Download the font which has all the code needed included.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hasanuzzaman Sattar
Solution 2
Solution 3 Wils
Solution 4 Mohsin