A
A
Alexander2020-02-13 09:39:04
Fonts
Alexander, 2020-02-13 09:39:04

Incomprehensible situation with the font woff2. What to do to make it work?

I have the same font in two files - woff and woff2. I connect them like this:

font-face {
   font-family: 'gico';
   font-weight: 400;
   src: local('gico'),
      url('../res/gico.woff2') format('woff2'),
      url('../res/gico.woff') format('woff');
}


Symbols from woff are displayed without problems, but not from woff2, instead of them there are some square frames. I noticed this strange picture in the browser developer tools:

woff:
Response Headers
Accept-Ranges: bytes
Connection: keep-alive
Content-Length: 2644
Content-Type: application/font-woff
Date: Thu, 13 Feb 2020 05:11:10 GMT
ETag: "5e44d09e-a54"
Last-Modified: Thu, 13 Feb 2020 04:29:18 GMT
Server: nginx/1.10.3

woff2:
Response Headers
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html ; charset=UTF-8
Date: Thu, 13 Feb 2020 05:11:10 GMT
Server: nginx/1.10.3
Transfer-Encoding: chunked

Not strong in the peculiarities of how fonts work in browsers. I need woff2 to work. In which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-02-13
@braxi

It turns out that I forgot to register woff2 in the server settings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question