diff --git a/packages/excalidraw/fonts/ExcalidrawFont.ts b/packages/excalidraw/fonts/ExcalidrawFont.ts index cb8a76fc02c7..e092d61a788b 100644 --- a/packages/excalidraw/fonts/ExcalidrawFont.ts +++ b/packages/excalidraw/fonts/ExcalidrawFont.ts @@ -6,11 +6,10 @@ export interface Font { fontFace: FontFace; getContent(): Promise; } -export const UNPKG_PROD_URL = `https://unpkg.com/${ - import.meta.env.VITE_PKG_NAME +export const UNPKG_PROD_URL = `https://unpkg.com/${import.meta.env.VITE_PKG_NAME ? `${import.meta.env.VITE_PKG_NAME}@${import.meta.env.PKG_VERSION}` // should be provided by vite during package build : "@excalidraw/excalidraw" // fallback to latest package version (i.e. for app) -}/dist/prod/`; + }/dist/prod/`; export class ExcalidrawFont implements Font { public readonly urls: URL[]; @@ -78,8 +77,7 @@ export class ExcalidrawFont implements Font { } console.error( - `Failed to fetch font "${ - this.fontFace.family + `Failed to fetch font "${this.fontFace.family }" from urls "${this.urls.toString()}`, JSON.stringify(errorMessages, undefined, 2), ); @@ -118,7 +116,7 @@ export class ExcalidrawFont implements Font { } // fallback url for bundled fonts - urls.push(new URL(assetUrl, UNPKG_PROD_URL)); + //urls.push(new URL(assetUrl, UNPKG_PROD_URL)); return urls; }