Hello! I make a website for my daughter - www.simultiki.rf. Tell me why the standard set of css-rules for fontface doesn't work for me:

@font-face { font-family: 'cassandraregular'; src: url('cassandra-webfont.eot'); src: url('cassandra-webfont.eot?#iefix') format('embedded-opentype'), url('cassandra-webfont.woff') format('woff'), url('cassandra-webfont.ttf') format('truetype'), url('cassandra-webfont.svg#cassandraregular') format('svg'); font-weight: normal; font-style: normal; } 

taken from the well-known generator ( @ font-face generator)? I put this code in the css file, copy the fonts to the server, what did I do wrong? ..

  • Everything is clear - in the generator it is necessary to put a tick in Cyrillic in the section of languages. - Aviko

3 answers 3

You connected it all correctly, but you did not connect it to CSS itself, that is, if you have this font for the entire site, write the following in the body tag:

 /* body ----------*/ body { font: 14px "cassandraregular", "Arial"; } 

Arial is like a safe font! But also do not forget to register in CSS the exact path where your converted font is url ('cassandra-webfont.eot'); - it should contain the path for example style.css in your CSS folder, and the font separately in the FONT folder.

 Значит в url будет таким url('../cassandra-webfont.eot'); либо url('../../cassandra-webfont.eot'); 
  • And is it necessary to prescribe it in the body? For example, I prescribe this font for headings only. I wrote the correct way, I threw the fonts into the root path, and the path was just 'cassandra-webfont.eot', etc., did not work (... - Aviko
  • Of course, not necessarily, it all depends on where you will use this or that font. I gave as an example. - nosensus
  • Well, I have prescribed font-family: 'cassandraregular', serif; for headlines, but why doesn’t it work? .. - Aviko
  • perhaps from the fact that the path is not correct? open firebug hover over your headline and see if the font in CSS has been loaded - nosensus
  • Strange, but no, not loaded! I already did not do anything, and I prescribed the full path of the type of simuliki. Rf / css and put it to the root, what is this ?! - Aviko

@ font-face Generator - the generator is good, but with Cyrillic it really does have problems. Try using this generator , in 99% of such cases, it rescued me.

  • In the generator, you need to select the expert mode and tick the Cyrillic alphabet in the language section and everything is decided - Aviko
  • No, not "everything is solved." If I had not encountered this problem, I would not have written. - Deonis
  • I don’t know, I look at browsershots, everything seems to be normal everywhere, and what are your problems? - Aviko
  • > ... and what are your problems? @Aviko, from me? ))) Now there are a lot of problems, for example, the government, fools and roads)) And with fonts - for a long time there are no problems - Deonis

I understand that this is no longer relevant, but search engines for problems with fonts are thrown onto this page. Therefore, I decided to add.

Here is the instruction on what to do here in this font generator to correctly display Cyrillic. It is also necessary to follow the correct placement of files and paths in css to them.

  • Welcome to Stack Overflow in Russian ! here it is customary to give a complete answer, and references are given only as a supplement / illustration. - aleksandr barakin