问题
I trying to do one (!) page with the app script HtmlService but want to have specific web fonts.
I added the CSS code for the web fonts, and integrated it with my CSS. It's not working.
I suspect Google Caja (HtmlService is going through the Caja filter) not being able to work with web fonts. Would you know if I am doing something wrong with HtmlService, or if there is any other way to have web fonts through the filtering of Caja?
<link href='http://fonts.googleapis.com/css?family=Fugaz+One' rel='stylesheet' type='text/css'>
回答1:
The stylesheet you refer to uses @font-face
to load a font. Caja does not currently support @font-face
, since it refers to external content (the font data) which Caja does not implement sanitization of and has not reviewed the risks of allowing through unchanged.
If you would like to have @font-face
support, please file an issue on Caja's public issue tracker requesting it.
(I am a developer on the Caja team.)
来源:https://stackoverflow.com/questions/12808007/app-script-htmlservice-use-with-font-like-google-web-fonts