Replies: 2 comments 1 reply
-
Using |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fixed it by adding the uno preset: <script src="https://cdn.jsdelivr.net/npm/@unocss/runtime/preset-uno.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime/preset-icons.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime/preset-web-fonts.global.js"></script>
<script>
window.__unocss = {
presets: [
() => window.__unocss_runtime.presets.presetUno({}),
() =>
window.__unocss_runtime.presets.presetIcons({
scale: 1.2,
cdn: 'https://esm.sh/',
}),
() =>
window.__unocss_runtime.presets.presetWebFonts({
customFetch: (url) => axios.get(url).then((it) => it.data),
provider: 'google',
fonts: {
sans: 'Inter',
audio: 'Audiowide',
bruno: 'Bruno Ace',
},
}),
],
}
</script>
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime/core.global.js"></script> For some reason, the only way to get rid of the "Failed to fetch web fonts", is adding the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an issue with the webfonts preset:
The general UnoCSS classes are available, and the icons work correctly.
And, although the font classes are correctly loaded from Google, I see "Failed to fetch web fonts" in the browser dev tools console.
Beta Was this translation helpful? Give feedback.
All reactions