在电子邮件中使用“Open Sans”字体而不使用Google字体

时间:2015-09-25 14:30:20

标签: css fonts

我有一个疑问,字体open-sans是一种安全的字体,可以在没有谷歌字体的情况下使用吗?

我无法使用外部链接,如何:

<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

我只需要使用font-family声明:

font-family: 'Open Sans', Arial, sans-serif;

2 个答案:

答案 0 :(得分:0)

Download Open Sans并将下面的webfont更改为open sans字体名称。

font-family: 'Open Sans', Arial, sans-serif;

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

答案 1 :(得分:0)

对于电子邮件,您应该只使用计算机上存在的默认字体。以下链接包含您可以使用的列表。

http://blog.campaignmaster.co.uk/2013/01/10/email-101-email-safe-fonts/