App Script HtmlService是否与Google Web Fonts之类的字体一起使用? [英] App Script HtmlService use with font like Google Web Fonts?

查看:94
本文介绍了App Script HtmlService是否与Google Web Fonts之类的字体一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用应用程序脚本HtmlService创建一个(!)页面,但希望具有特定的Web字体.

I trying to do one (!) page with the app script HtmlService but want to have specific web fonts.

我添加了Web字体的CSS代码,并将其与我的CSS集成在一起.它不起作用.

I added the CSS code for the web fonts, and integrated it with my CSS. It's not working.

我怀疑 Google Caja (HtmlService正在通过Caja过滤器进行过滤)无法使用网络字体.您是否知道我对HtmlService的处理是否有问题,或者是否还有其他方法可以通过对Caja的过滤来获取Web字体?

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'>

推荐答案

您引用的样式表使用@font-face加载字体. Caja当前不支持@font-face,因为它引用了

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.

如果您希望获得@font-face支持,请在上提出问题. Caja的公开问题跟踪器对其进行了请求.

If you would like to have @font-face support, please file an issue on Caja's public issue tracker requesting it.

(我是Caja团队的一名开发人员.)

(I am a developer on the Caja team.)

这篇关于App Script HtmlService是否与Google Web Fonts之类的字体一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆