M
M
Maqsat Batyrqul2015-10-06 16:51:04
css
Maqsat Batyrqul, 2015-10-06 16:51:04

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";
}

On my computer and on the computers of my colleagues (microsoft , mac os , Chrome, Mozilla) the OpenSans font is displayed normally
and the client (Windows , Chrome) for some reason displays the New Times Roman font

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nastya, 2015-10-07
@Maqsat

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

S
Sergey Goryachev, 2015-10-06
@webirus

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 question

Ask a Question

731 491 924 answers to any question