A
A
Andrew Maser2015-06-11 10:23:08
css
Andrew Maser, 2015-06-11 10:23:08

On other computers, the font on the page is not displayed, which lies in the directory on the site, it works fine on mine. what to do?

With
@font-face {
font-family: academy;
src: url(../fonts/Academy.ttf);
connected the font,
body{font-family: academy;}
called, on my computer it is displayed normally, on others the standard one is displayed. help pliz

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel, 2015-06-11
@PavelMonro

@font-face{
font-family: 'Academy';
src: url('Academy');
src: url('Academy.eot?iefix') format('eot'),
url('Academy.woff') format('woff'),
url('Academy.ttf') format('truetype'),
url ('Academy.svg#webfont') format('svg');
}
body { font-family: 'Academy', Arial, sans-serif;}

A
Andrey Goncharov, 2015-06-11
@agmegadeth

Often in such cases, the console in the browser developer panel indicates an error. It would be to see - then you can give recommendations.
In the meantime, just check the correctness of the paths to the fonts from the file with the @font-face connection.
The font you need is installed locally on your computer, so the browser does not need to download it from the server. On other computers, the font is not installed in the system, so it tries to download from the server - and here the error text is already needed for analysis

J
Julia Starchenko, 2015-06-11
@julia_amake

did you include only .ttf? in order for the font to be displayed in all browsers, you also need to include .eot (for IE) and woff (it is understood by almost everyone and weighs less than ttf, so we write it before .ttf), it is not necessary to include svg for iphone and ipad. That is, there should be something like this entry and all these files are available:
@font-face {
font-family: 'academy';
src: url(../fonts/Academy.eot);
src: url(../fonts/Academy.eot?#iefix) format('embedded-opentype'),
url(../fonts/Academy.woff) format('woff'),
url(../fonts/ Academy.ttf) format('truetype'),
url('../fonts/Academy.svg#academy') format('svg');
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question