#font loading failing

2 messages · Page 1 of 1 (latest)

wide apexBOT
#

Hi @halcyon wolf. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, it seems that Astro has had issues with loading local fonts, especially those with .otf and .ttf extensions (source (https://github.com/withastro/astro/issues/7574)). However, these issues were reported to be resolved when the fonts were converted to .woff format.

In your case, the error message suggests that the module '/fonts/AstroSpace.otf' cannot be found. This could be due to the path specified in your tailwind.config.ts file.

You mentioned that your font is located in public/fonts/AstroSpace.otf. However, in your tailwind.config.ts file, you're trying to import it from /fonts/AstroSpace.otf. The path should likely be relative to the location of your tailwind.config.ts file.

Unfortunately, without more information about your project structure, it's hard to provide a more specific solution. You might want to check the path to your font file and make sure it's correct.

If the issue persists, you could try converting your font to .woff format as a workaround, as suggested in the knowledge sources.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: