HttpError 400: error adding custom fonts in Theme.tsx
Closed this issue · 0 comments
devartes commented
When someone tries to use a font like the example below,
Example
- please look at this doc: https://www.deco.cx/docs/en/performance/medias/fonts#custom-fonts:
Family: Your Font
<style>
@font-face {
font-family: 'Your Font';
font-style: normal;
font-weight: weighthere;
font-display: swap;
src: url(/live/invoke/website/loaders/asset.ts?src=https://sualoja.deco.site/minha_fonte.ttf) format('truetype');
}
</style>
the font may not be displayed, if you try to access the URL for the font in the repository, it shows a 400 error and the font is not downloaded
Line 50 in b780e67
In the code below when STALE
is removed, the font is downloaded and displayed on the website:
- note: may or may not work with some fonts
Lines 1 to 22 in b780e67
- At first it appears to be a cache-related problem