From a078fa42f8e2de4c55c8ee465cb660dc0f886082 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Mon, 21 Oct 2024 20:57:36 +0200 Subject: [PATCH] 0.17.6-4, 2.5.3-beta-3 --- packages/excalidraw/entry.js | 2 +- packages/excalidraw/obsidianUtils.ts | 5 ++--- packages/excalidraw/package.json | 2 +- packages/excalidraw/webpack.dev.config.js | 4 ++-- packages/excalidraw/webpack.prod.config.js | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/excalidraw/entry.js b/packages/excalidraw/entry.js index e459ef6f8cc7..734b8872fb6f 100644 --- a/packages/excalidraw/entry.js +++ b/packages/excalidraw/entry.js @@ -1,7 +1,7 @@ import "./publicPath"; import polyfill from "./polyfill"; -import "./fonts/css/fonts.css"; +import "./fonts/fonts.css"; polyfill(); export * from "./index"; diff --git a/packages/excalidraw/obsidianUtils.ts b/packages/excalidraw/obsidianUtils.ts index c978e6cd1fb4..9176cdafb694 100644 --- a/packages/excalidraw/obsidianUtils.ts +++ b/packages/excalidraw/obsidianUtils.ts @@ -1,7 +1,7 @@ import { FreedrawIcon } from "./components/icons"; import { FONT_FAMILY } from "./constants"; import { NonDeletedExcalidrawElement } from "./element/types"; -import { Fonts, register } from "./fonts"; +import { Fonts } from "./fonts"; import type { FontMetadata } from "./fonts/FontMetadata"; import { FONT_METADATA } from "./fonts/FontMetadata"; @@ -63,12 +63,11 @@ export function registerLocalFont( fontMetrics: FontMetadata & { name: string }, uri: string, ) { - const _register = register.bind({ registered: Fonts.registered }); FONT_METADATA[FONT_FAMILY["Local Font"]] = { metrics: fontMetrics.metrics, icon: FreedrawIcon, }; - _register("Local Font", fontMetrics, { uri }); + Fonts.register("Local Font", fontMetrics, { uri }); } export function getFontFamilies(): string[] { diff --git a/packages/excalidraw/package.json b/packages/excalidraw/package.json index 95fc99bfd0ef..7933fa2e9bcc 100644 --- a/packages/excalidraw/package.json +++ b/packages/excalidraw/package.json @@ -1,6 +1,6 @@ { "name": "@zsviczian/excalidraw", - "version": "0.17.6-3", + "version": "0.17.6-4", "main": "main.js", "types": "types/excalidraw/index.d.ts", "files": [ diff --git a/packages/excalidraw/webpack.dev.config.js b/packages/excalidraw/webpack.dev.config.js index 2c1358c0221a..49bdea8fe151 100644 --- a/packages/excalidraw/webpack.dev.config.js +++ b/packages/excalidraw/webpack.dev.config.js @@ -109,7 +109,7 @@ module.exports = { new CopyWebpackPlugin({ patterns: [ { - from: path.resolve(__dirname, 'fonts/woff2/Assistant'), // Path to your font files + from: path.resolve(__dirname, 'fonts/Assistant'), // Path to your font files to: path.resolve(__dirname, 'dist/excalidraw-assets'), // First output path globOptions: { dot: true, @@ -118,7 +118,7 @@ module.exports = { }, }, { - from: path.resolve(__dirname, 'fonts/woff2/Assistant'), // Same source path + from: path.resolve(__dirname, 'fonts/Assistant'), // Same source path to: path.resolve(__dirname, 'dist/excalidraw-assets-dev'), // Second output path globOptions: { dot: true, diff --git a/packages/excalidraw/webpack.prod.config.js b/packages/excalidraw/webpack.prod.config.js index cbf209e0862d..eec29ed8e3bb 100644 --- a/packages/excalidraw/webpack.prod.config.js +++ b/packages/excalidraw/webpack.prod.config.js @@ -128,7 +128,7 @@ module.exports = { new CopyWebpackPlugin({ patterns: [ { - from: path.resolve(__dirname, 'fonts/woff2/Assistant'), // Path to your font files + from: path.resolve(__dirname, 'fonts/Assistant'), // Path to your font files to: path.resolve(__dirname, 'dist/excalidraw-assets'), // First output path globOptions: { dot: true, @@ -137,7 +137,7 @@ module.exports = { }, }, { - from: path.resolve(__dirname, 'fonts/woff2/Assistant'), // Same source path + from: path.resolve(__dirname, 'fonts/Assistant'), // Same source path to: path.resolve(__dirname, 'dist/excalidraw-assets-dev'), // Second output path globOptions: { dot: true,