I
I
Ibishka2019-08-21 08:43:09
Fonts
Ibishka, 2019-08-21 08:43:09

How to properly connect fonts to the site?

And what is the best way to connect fonts through google fonts, import, fontface so that the load is minimal and the page loads quickly????

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sergski, 2019-08-21
@Ibishka

Theoretically @font-face is faster, maybe -1 request. Use @font-face with font-display and no beard from eot, ttf etc, woff/woff2 and really needed set of many font styles is enough.
And Googlefonts is comfortable to use, yes)

A
alekseyHunter, 2019-08-21
@alekseyHunter

Download the fonts, add them to the fonts folder, include them in CSS:

@font-face {
    font-family: Huntsman;
    src: url('../fonts/Huntsman.woff');
}

Page loading does not depend on fonts. It takes a long time to load if it performs a lot of database queries that must be processed by a php script. Only after that the page will be formed.
It can also take a long time to load if there are huge (more than 1 MB) pictures on the page.
Tip : Use tools to check the page loading speed of the site, compress images, reduce the number of database queries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question