-
Notifications
You must be signed in to change notification settings - Fork 10
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
Attempts to grab fonts from ${origin}/fonts
?
#57
Comments
Interesting, thanks for the report. Indeed: _base_fonts_url = "/fonts/" should probably be changed to: from pyodide_js._api.config import indexURL
_base_fonts_url = f"{indexURL}/fonts/" |
It seems that jsdelivr returns a 403 for this which is another problem. |
@MartinKolarik Could you whitelist |
Should be allowed now! If you run into issues with any specific URL, you can purge the cache via https://www.jsdelivr.com/tools/purge |
Thanks! Now if I patch it like this:
it successfully downloads the font from: I cannot tell the difference in the rendered output though. It looks identical to me whether the font download succeeds or fails. |
Using this example that's linked from the official blog post:
https://jsfiddle.net/gh/get/library/pure/pyodide/pyodide-blog/contents/demos/canvas-renderer-matplotlib/demo-1/
It tries and fails to get
https://fiddle.jshell.net/fonts/DejaVuSans.ttf
. I tried updating it to the lastest version by replacing the script tag with:and swapping this:
for the newer:
But the same issue occurs. I'm guessing this is why the pan/zoom buttons of plots aren't the right size, and don't have any text in them, in the example linked above? (and also in the latest version of Pyodide)
The text was updated successfully, but these errors were encountered: