nuxt-og-image 1.0.0-beta.11 → 1.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -186,7 +186,7 @@ const module = defineNuxtModule({
|
|
|
186
186
|
async setup(config, nuxt) {
|
|
187
187
|
const { resolve } = createResolver(import.meta.url);
|
|
188
188
|
if (!config.fonts.length)
|
|
189
|
-
config.fonts
|
|
189
|
+
config.fonts = ["Inter:400", "Inter:700"];
|
|
190
190
|
const distResolve = (p) => {
|
|
191
191
|
const cwd = resolve(".");
|
|
192
192
|
if (cwd.endsWith("/dist"))
|
|
@@ -11,8 +11,9 @@ export async function loadFont(url, font) {
|
|
|
11
11
|
const storageKey = `nuxt-og-image:font:${font}`;
|
|
12
12
|
const hasStoredFont = await useStorage().hasItem(storageKey);
|
|
13
13
|
if (!hasStoredFont) {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
data = await $fetch(fontUrl, {
|
|
15
|
+
responseType: "arrayBuffer"
|
|
16
|
+
});
|
|
16
17
|
await useStorage().setItem(storageKey, data);
|
|
17
18
|
} else {
|
|
18
19
|
data = await useStorage().getItem(storageKey);
|