Skip to content

Commit

Permalink
0.17.6-4, 2.5.3-beta-3
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed Oct 21, 2024
1 parent 8423c68 commit a078fa4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/excalidraw/entry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./publicPath";
import polyfill from "./polyfill";

import "./fonts/css/fonts.css";
import "./fonts/fonts.css";

polyfill();
export * from "./index";
5 changes: 2 additions & 3 deletions packages/excalidraw/obsidianUtils.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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[] {
Expand Down
2 changes: 1 addition & 1 deletion packages/excalidraw/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
4 changes: 2 additions & 2 deletions packages/excalidraw/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/excalidraw/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit a078fa4

Please sign in to comment.