Answer the question
In order to leave comments, you need to log in
Some fonts crash when transferring a site to a hosting. What's wrong?
Good afternoon, I made up a page, pulled it on cms (Wordpress), set up bases and addresses - everything works, but some fonts have fallen off (just some: there are 5 in total), they work on the local server, but they don’t want to on the hosting itself. Fonts are used for headings, but not for the rest of the text. What is the problem ? CSS:
@font-face {
font-family: days_sans; /* Гарнитура шрифта */
src: url(fonts/dayssansblack.ttf); /* Путь к файлу со шрифтом */
}
@font-face {
font-family: troika; /* Гарнитура шрифта */
src: url(fonts/troika.ttf); /* Путь к файлу со шрифтом */
}
@font-face {
font-family: cousine; /* Гарнитура шрифта */
src: url(fonts/cousine.ttf); /* Путь к файлу со шрифтом */
}
@font-face {
font-family: americantext; /* Гарнитура шрифта */
src: url(fonts/americantext.ttf); /* Путь к файлу со шрифтом */
}
body{
color: #fff;
font-family: cousine;
}
h2{
color: #fff;
font-family: troika;
font-size: 45pt;
margin: 50px 0;
}
h3{
color: #fff;
font-family: troika;
font-size: 25pt;
margin: 25px 0;
}
h4{
font-family: troika;
font-size: 15pt;
margin: 15px 0;
}
Answer the question
In order to leave comments, you need to log in
1) try to set absolute from the root
of the type
2) Check the case in the font name and registered in css (sometimes in file managers there is a forced conversion to lower case when transferring via ftp)
3) Check for the presence of the files themselves, just in case, re-upload the folder with fonts
And it would be nice to use a cross-browser connection method.
@font-face {
font-family: 'helveticaneuecyr_roman';
src: url('../font/helveticaneuecyr_roman.eot');
src: url('../font/helveticaneuecyr_roman.eot?#iefix') format('embedded-opentype'),
url('../font/helveticaneuecyr_roman.woff2') format('woff2'),
url('../font/helveticaneuecyr_roman.woff') format('woff'),
url('../font/helveticaneuecyr_roman.ttf') format('truetype'),
url('../font/helveticaneuecyr_roman.svg#helveticaneuecyr_roman') 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