yuzutech / kroki

Creates diagrams from textual descriptions!
https://kroki.io
MIT License
2.96k stars 223 forks source link

excalidraw fonts are not rendered #1742

Open flipswitchingmonkey opened 7 months ago

flipswitchingmonkey commented 7 months ago

"not rendered" as in, using the default font and not the two excalidraw fonts...

See this screenshot from the kroki.io page CleanShot_20240426_154724

Is this related to KROKI_EXCALIDRAW_ASSET_PATH somehow?

ggrossetie commented 6 months ago

Font URL in Excalidraw is not resolved correctly: https://unpkg.com/@excalidraw/excalidraw@undefined/dist/excalidraw-assets/Virgil.woff2

The minified code is:

F=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/"
 .concat("@excalidraw/excalidraw","@")
 .concat({
  VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",
  VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",
  VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",
  VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",
  VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",
  VITE_APP_PLUS_LP:"https://plus.excalidraw.com",
  VITE_APP_PLUS_APP:"https://app.excalidraw.com",
  VITE_APP_WS_SERVER_URL:"",
  VITE_APP_FIREBASE_CONFIG:'{
    "apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU",
    "authDomain":"excalidraw-room-persistence.firebaseapp.com",
    "databaseURL":"https://excalidraw-room-persistence.firebaseio.com",
    "projectId":"excalidraw-room-persistence",
    "storageBucket":"excalidraw-room-persistence.appspot.com",
    "messagingSenderId":"654800341332",
   "appId":"1:654800341332:web:4a692de832b55bd57ce0c1"
  }',
  VITE_APP_DISABLE_TRACKING:"",
  VITE_PKG_NAME:"@excalidraw/excalidraw",
  VITE_PKG_VERSION:"0.17.3",
  VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0
}.PKG_VERSION)

It tries to get PKG_VERSION but the key is VITE_PKG_VERSION 🤔

ggrossetie commented 6 months ago

Upstream issue: https://github.com/excalidraw/excalidraw/issues/7984