Answer the question
In order to leave comments, you need to log in
The same font, different in different computers (not browsers, in one computer all browsers show the same), why?
@font-face {
font-family: "OpenSansRegular";
src: url(../fonts/open-sans/OpenSans-Regular.ttf);
}
@font-face {
font-family: "OpenSansLight";
src: url(../fonts/open-sans/OpenSans-Light.ttf);
}
body{
font-family: "OpenSansRegular","Arial";
}
Answer the question
In order to leave comments, you need to log in
It is necessary to generate a font through font generator services such as www.fontsquirrel.com/tools/webfont-generator or fonts4web.ru
There, find the font you need or, as with the first service, you can upload your font, then upload the resulting font files with different extensions to the server to the fonts folder (well, or wherever it is convenient), and transfer the code like what is written in the answer above from Sergey Goryachev to the css file.
The problem is that not everyone has the font you need installed on their computer. And in order for the fonts to look the same everywhere, they need to be connected.
By the way, fonts can also be connected using the service from google https://www.google.com/fonts
Use the extended font connection construct.
Probably, you (on your computer and the computer of a colleague) have Open Sans installed in the system.
@font-face {
font-family: 'neosanspro_bold';
src: url('../fonts/neosanspro_bold.eot');
src: url('../fonts/neosanspro_bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/neosanspro_bold.woff2') format('woff2'),
url('../fonts/neosanspro_bold.woff') format('woff'),
url('../fonts/neosanspro_bold.ttf') format('truetype'),
url('../fonts/neosanspro_bold.svg#neosanspro_bold') format('svg');
font-weight: normal;
font-style: normal;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question