I have uploaded a custom font.
Created a custom class to apply this font:
.cursive {
font-family: "Lobster";
}
Put it in Bricks > Settings > Custom code.
Then applied it in a Heading block. The font wasn’t called in the page (https://domini.wstudio.dev/vendre/)
This is because the font-face rule is missing in the Bricks " Settings " Custom CSS. Think of the Bricks Settings styles as an external stylesheet that is basically always “bluntly” included on every page - no matter what page it is.
If you assign a custom font there, but there is no font-face rule that says where the custom font is, it won’t work either. Long story short, just add this to the settings (above the .cursive class) and it works
@timmse
So if I added 4 custom fonts, it means that I have to add @font-face x4 times, one for each font? Where in the Academy this is explained? I tried to find it to no avail!
No, you don’t have to. As soon as you add an element that has your custom font applied, the corresponding CSS and font-face rules are added automatically.
In Jo’s case, she added the class with custom CSS. On one of her pages, it was working because she already added an element using the same font-family on that page (so the font-face rules were added automatically). On another page, it didn’t work, because there was no element using the font-family which causes the missing font-face rules.