I know that using multiple different fonts with font-face has a considerable performance implication if the website is already resource extensive, particularly on mobile (although less so, now that all phones are basically mini computers).
In this case, I am talking about a web-app so this is not a normal website so the performance is very important.
Basically, I am thinking about naming my fonts as "header-stats" "header-quote" and so on, having a font face for every meaningful section.
@font-face {
font-family: "section1";
src: url("/dist/fonts/example.woff");
}
@font-face {
font-family: "section2";
src: url("/dist/fonts/example.woff");
}
I have 2 sections with the same font, just naming them differently so it's easier to edit and reason about later, because I might want to change the fonts of that section later. Note that this is not a huge problem in the age of sass and alike, all my css files are grouped in different folders/files anyway, but it will be nice if it's possible to do this. I can do this with variables easily and that's cleaner, just wondering about this case specially. Please don't suggest alternatives.
Does anyone have any information on how this impacts browser performance? Is it the same as 2 different fonts or do most major browsers account for this?
list-style-image
, you will see the image being downloaded only once in the Network tab of your browsers debug console. I'd believe this is not different for fonts. But since it is speculation I post this as a comment.