D
D
Dmitry2016-10-21 17:08:16
css
Dmitry, 2016-10-21 17:08:16

Why is the font displayed differently?

In general, I have a couple of fonts in the layout. Downloaded, installed, connected - not displayed.
This is how I connected them in css:
699d4f5fd4f34f2d9faa76a7a26f9e3a.pngThis is how the Playfair font is displayed: (I specifically use the extension to show what font is used on the page)
b44a7820e3224f68ab7eb64dcfbaefd7.pngThis is how it should be displayed:
8c829c2e8079426ba2e3afc8edb9ee9f.png
What is the problem and how to solve it?
UPD: To the answer about the paths:
3fa64ea9821f4923b8d5cb3a25922cdd.pngUPD 2: the problem is specifically in this font, because I tried to include other fonts and they displayed fine.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Goryachev, 2016-10-21
@letehaha

And I think the problem is in the font generation.
Using the Font squirrel, make a font and add cross-browser code.

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

61ee616103944b058004f42e22edb0b6.png

D
dom1n1k, 2016-10-21
@dom1n1k

Most likely, something with the paths - the browser does not find font files.

D
DTX, 2016-10-21
@DirecTwiX

The font used during rendering can be viewed on the Computed tab.
XJuLIHA.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question