Gmail not showing correct font(Gmail 没有显示正确的字体)
问题描述
我正在尝试更改电子邮件的字体以打开 sans,但是,我在 Gmail 呈现正确字体时遇到问题.我设法找到了解决前景问题的方法.这就是我所拥有的:
I am trying to change the font of my emails to open sans, however, I am having issues with Gmail rendering the correct font. I managed to find a way to solve the issue for outlook. This is what I have:
身体{
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3bO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
}
}
我还尝试了其他方法,例如将所有文本声明为开放式:
I have also tried other things such as declaring all text to be open sans:
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300'rel='stylesheet'type='text/css'>
<style type="text/css">
.stylealltext { font-family: 'Open Sans', sans-serif;}
.stylealltextbold {font-weight: bold; font-family: 'Open Sans', sans-serif; }
但是,Gmail 决定显示 Arial,而 Google Inbox 决定显示 Helvetica.看起来 Google 的邮件服务只是覆盖了我提供的任何内容.有人可以帮忙吗?
However, Gmail decides to show Arial, while Google Inbox decides to show Helvetica.. It looks like Google's mailing services just overrides whatever I feed it. Can anyone help?
解决方案
Salvimatus 的解决方案奏效了:
Salvimatus's solution worked:
<span style="font-family: your-chosen-font">your text</span>
span需要手动添加.
The span needs to manually added.
推荐答案
Gmail 不支持@font-face.
Gmail does not support @font-face.
如果您自定义字体,您应该在您拥有的每个文本块中写入内联:
For you customize the font, you should write inline in each block of text that you have:
<代码><span style="font-family: your-chosen-font">你的文字</span>
注意:必须是我们在 Windows 或 Mac 上自带的字体.
Note: must be a font we have natively on Windows or Mac.
这篇关于Gmail 没有显示正确的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Gmail 没有显示正确的字体
基础教程推荐
- 动态更新多个选择框 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 我什么时候应该在导入时使用方括号 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01
- 在for循环中使用setTimeout 2022-01-01