php - How could I use local fonts in website
Get the solution ↓↓↓Solution:
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 familyfont-family: 'MTCORSVA';
Answer
Solution:
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. :)
Answer
Solution:
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;
}
Answer
Solution:
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.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: videoxxx
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.