codimd
codimd copied to clipboard
Unable to import font in slide mode
trafficstars
Is there a way to import a font from Google APIs and use it in slides?
I tried things like this but couldn't find way out.
<style type="text/css">
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300&display=swap');
...
Great work, the app is excellent
I had the same problem with a conference talk I gave using hackmd.io.
@import seems to be ignored.
@font-face seems to work in principal, but the content security policy prevents my chrome from loading the font from https://fonts.gstatic.com/.
The workarounds I am aware of are using @font-face and
- using a plugin in chrome to disable CSP or
- in a local
codimdinstance, disable CSP by settingCMD_CSP_ENABLE=false
Hi everyone,
We explicit removed support of @import in CSS style tag to avoid security issues which you can load arbitrary files in.