diff --git a/manifest.json b/manifest.json index e5039d0..9c97364 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "1.5.18", + "version": "1.5.19", "minAppVersion": "0.12.16", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/package.json b/package.json index 5182511..02bab21 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "author": "", "license": "MIT", "dependencies": { - "@zsviczian/excalidraw": "0.10.0-obsidian-34", + "@zsviczian/excalidraw": "0.10.0-obsidian-35", "monkey-around": "^2.2.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/src/ExcalidrawView.ts b/src/ExcalidrawView.ts index 7821d49..0b36073 100644 --- a/src/ExcalidrawView.ts +++ b/src/ExcalidrawView.ts @@ -824,7 +824,6 @@ export default class ExcalidrawView extends TextFileView { : this.excalidrawAPI.getAppState().zenModeEnabled; //debug({where:"ExcalidrawView.loadDrawing",file:this.file.name,dataTheme:excalidrawData.appState.theme,before:"updateScene"}) this.excalidrawAPI.setLocalFont( - this.plugin.fourthFontDataURL, this.plugin.settings.experimentalEnableFourthFont ); @@ -1076,7 +1075,6 @@ export default class ExcalidrawView extends TextFileView { //console.log({where:"ExcalidrawView.React.ReadyPromise"}); //debug({where:"ExcalidrawView.React.useEffect",file:this.file.name,before:"this.loadSceneFiles"}); this.excalidrawAPI.setLocalFont( - this.plugin.fourthFontDataURL, this.plugin.settings.experimentalEnableFourthFont ); diff --git a/src/main.ts b/src/main.ts index c3d2472..42284bd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -123,7 +123,6 @@ export default class ExcalidrawPlugin extends Plugin { public mathjax: any = null; private mathjaxDiv: HTMLDivElement = null; public scriptEngine: ScriptEngine; - public fourthFontDataURL: string = VIRGIL_DATAURL; public fourthFontDef: string = VIRGIL_FONT; constructor(app: App, manifest: PluginManifest) { super(app, manifest); @@ -194,14 +193,14 @@ export default class ExcalidrawPlugin extends Plugin { public initializeFourthFont() { this.app.workspace.onLayoutReady(async() => { const font = (await getFontDataURL(this.app,this.settings.experimantalFourthFont,"","LocalFont")); - this.fourthFontDataURL = font.dataURL === "" ? VIRGIL_DATAURL : font.dataURL; + const fourthFontDataURL = font.dataURL === "" ? VIRGIL_DATAURL : font.dataURL; this.fourthFontDef = font.fontDef const newStylesheet = document.createElement("style"); newStylesheet.id = "local-font-stylesheet"; newStylesheet.textContent = ` @font-face { font-family: 'LocalFont'; - src: url("${font}"); + src: url("${fourthFontDataURL}"); font-display: swap; } `; diff --git a/versions.json b/versions.json index 01c9d37..7e76d4f 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ { - "1.5.18": "0.12.16", + "1.5.19": "0.12.16", "1.4.2": "0.11.13" } diff --git a/yarn.lock b/yarn.lock index c630f15..3a520e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1232,10 +1232,10 @@ "@typescript-eslint/types" "5.6.0" "eslint-visitor-keys" "^3.0.0" -"@zsviczian/excalidraw@0.10.0-obsidian-34": - "integrity" "sha512-I4oDgvTq64REssawUrucdk+6f2GQR1/nblQLyGJNtopmGg9KiLM88y7M89Tc7VLQSRVxpFBtRPB/1URHC/b7Jg==" - "resolved" "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.10.0-obsidian-34.tgz" - "version" "0.10.0-obsidian-34" +"@zsviczian/excalidraw@0.10.0-obsidian-35": + "integrity" "sha512-ENNMBqXb1keqZzOlyaMswmpOBh+Drr7EeuZ9sp4psdtFbjHyS3ZmPpQ9EIZEcFd75sbciK2Klu439/ioogC+Yg==" + "resolved" "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.10.0-obsidian-35.tgz" + "version" "0.10.0-obsidian-35" dependencies: "dotenv" "10.0.0"