Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (optional) excalidraw custom asset path #1654

Merged

Conversation

gerlingsm
Copy link
Contributor

@gerlingsm gerlingsm commented Oct 2, 2023

Replace pull request #1652 and fix issue #1651

excalidraw/src/worker.js Outdated Show resolved Hide resolved
@ggrossetie
Copy link
Member

@gerlingsm It seems that using an empty value is the best of both worlds since it won't load assets from a CDN server side but it will use the CDN on client side (for fonts):

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 577 515" width="577" height="515">
  <!-- svg-source:excalidraw -->
  <defs>
    <style class="style-fonts">
      @font-face {
        font-family: &quot;Virgil&quot;;
        src: url(&quot;https://unpkg.com/@excalidraw/[email protected]/dist/excalidraw-assets/Virgil.woff2&quot;);
      }
      @font-face {
        font-family: &quot;Cascadia&quot;;
        src: url(&quot;https://unpkg.com/@excalidraw/[email protected]/dist/excalidraw-assets/Cascadia.woff2&quot;);
      }
    </style>
  </defs>

@ggrossetie ggrossetie merged commit 2965a67 into yuzutech:main Oct 13, 2023
4 checks passed
@gerlingsm gerlingsm deleted the feature/excalidraw_custom_asset_path branch October 16, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants