为了账号安全,请及时绑定邮箱和手机立即绑定

GMAIL 中的 Google 字体无法识别

GMAIL 中的 Google 字体无法识别

PHP
阿波罗的战车 2023-04-28 14:41:07
我正在使用 PHPMailer 发送邮件,Gmail 似乎无法识别标题中的字体“Kaushan Script”,但它成功识别了正文其余部分的“Roboto Condensed”。两者都是谷歌字体。尽管如此,gmail 还是能够识别一个并忽略另一个并放置它自己的随机字体。检查 gmail 中的元素仍然显示我使用的字体名称。这是我的代码:<!DOCTYPE html>  <html>   <head>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap" rel="stylesheet">     <link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">     <style>      .mail-head, .mail-foot {        background: linear-gradient(315deg, #ee9617 0%, #fe5858 74%);        padding: 10px;        width: 100%;        box-sizing: border-box;        color: #fff;        font-size: 2rem;        font-family: "Kaushan Script", cursive;      }      .mail-foot {        font-size: 14px;        text-align: center;        font-family: "Roboto Condensed", sans-serif;      }      .mail-body {        font-size: 1rem;        font-family: "Roboto Condensed", sans-serif;        padding: 20px;        line-height: 1.5;        border-right: 1px solid #ee9617;        border-left: 1px solid #fe5858;      }      .logo {        width: auto;        height: 2.5rem;      }      .logo-title {        position: absolute;        top: 1rem;        left: 4.5rem;      }      .otp {        color: #f69;        margin-left: 10px;      }     </style>   </head>   <body>     <div class="mail-head">       <span class="logo-title">Site Name</span>     </div>
查看完整描述

1 回答

?
偶然的你

TA贡献1841条经验 获得超3个赞

语境

据我所知,Gmail 并不支持所有的 Google 字体或网络字体。2018 年 4 月,Gmail 为其网络邮件客户端发布了更新的界面。这个新界面使用了有限的流行网络字体列表,包括 Google Sans 和 Roboto。(这解释了为什么 Roboto 工作是你的情况)。

问题

我没有找到关于此的官方文档,也没有找到支持 Gmail 界面的 Google 字体或网络字体列表。

选择

这些是 Gmail 支持的字体。尝试更改其中任何一个的“Kaushan Script”以确认 Gmail 不支持“Kaushan Script”。检查您是否可以使用这些字体中的任何一种来替换“Kaushan Script”。否则我建议改用图像。

  • 宋体

  • 宋体黑

  • Arial 窄版

  • 文人老派

  • 古书

  • 木炭

  • 导游

  • 快递新

  • 漫画无 MS

  • 固定宽度(等宽)

  • 加拉蒙

  • 日内瓦

  • 乔治亚州

  • 黑体字

  • 影响

  • 清醒领事

  • 大露西达

  • 没有 Unicode 的 Lucida

  • 摩纳哥

  • 商务车

  • 无衬线字体

  • 窄 (arial 窄)

  • 纽约

  • 巴拉丁

  • 帕拉蒂诺排字机

  • 机器人

  • 无衬线字体(宋体)

  • Serif (times new roman)(衬线体)

  • 象征

  • 塔霍马

  • Times New Roman(times new roman, serif)

  • Trebuchet MS (trebuchet ms, sans-serif)

  • 绿色

  • 织带

  • 宽幅(宋体黑)

  • 翼丁

  • Zapf 标志符号

祝你好运!


查看完整回答
反对 回复 2023-04-28
  • 1 回答
  • 0 关注
  • 90 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信