Imagine the situation: I downloaded someone else's project with a bunch of css files, chose the most important one in my opinion, added there:

@font-face { font-family: 'bebas_neueregular'; src: url('~/Content/fonts/bebasneue_regular-webfont.woff2') format('woff2'), url('~/Content/fonts/bebasneue_regular-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } body { font-family: bebas_neueregular; } 

The paths are correct, but anyway Times New Roman is rendered. How to look for a problem in this case?

UPD: I'm a dummy, I did not support Cyrillic font)))

  • through the debugger to see which font is actually displayed on the desired element. and see where it comes from - lexxl
  • @lexxl please explain how to the person who sees it for the first time) - Sergey Tambovtsev

1 answer 1

When you connect a custom font, you must specify the name in brackets:

 font-family: "bebas_neueregular"; 
  • I checked all combinations of quotes, the result is the same - Sergey Tambovtsy
  • @ sergeitambovtsev means the path is incorrect to the fonts specified - user192664
  • fonts are exactly in the prescribed directory - Sergey Tambovtsev
  • @ sergeytambovtsev, you looked at the console console, do the fonts load exactly? - Visman
  • @Visman yes, it is downloaded in the console, in the usual html page the behavior is the same, and the font works correctly, but for some reason it’s not in the project - Sergey Tambovtsev