我要疯了。我正在尝试在我的电子邮件中使用购买的字体,但我无法调试出了什么问题/为什么它不起作用。这是当前的头部和 DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="IE=edge">
然后我还做了一个样式声明,我使用@font-face 来定义这个自定义字体。(我已经删除了下面的 cloudapp 链接,因为它们被缩短了,但是我已经对照这个例子检查了列表本身https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_font-face_rule_bold看看如果链接有效(通过将我的链接替换为他们的链接)并且它也可以保留在那里。
<style type="text/css">
@font-face {
font-family:'montreal-regularregular';
src:url([the actual Url hosted on cloudapp]) format("woff2"),
url([the actual Url hosted on cloudapp]) format("woff")
url([the actual Url hosted on cloudapp]) format('truetype'); font-weight:normal; font-style:normal;}
@font-face {
font-family:'montreal-boldregular';
src:url([the actual Url hosted on cloudapp]) format("woff2"),
url([the actual Url hosted on cloudapp]) format("woff"); font-weight:normal; font-style:normal;}
@font-face {
font-family:'montreal-mediumregular' !important;
src:url([the actual Url hosted on cloudapp]) format("woff2") !important,
url([the actual Url hosted on cloudapp]) format("woff")!important,
url([the actual Url hosted on cloudapp]) format('truetype')!important; font-weight:normal; font-style:normal;}
@font-face {
font-family:'montreal-demiboldregular';
src:url([the actual Url hosted on cloudapp]) format("woff2"),
url([the actual Url hosted on cloudapp]) format("woff")
url([the actual Url hosted on cloudapp]) format("truetype"); font-weight:normal; font-style:normal;}
你会看到我已经包含!important
了(尽管它看起来也没有用)。然后当我稍后引用字体时,<td>
我会这样做:
<body style="font-family: montreal-regularregular,Lucida Grande, Lucida Sans Unicode, Tahoma, Sans-Serif; margin: 0">
<table align="center" style="max-width:600px;min-width:360px;width:100%;background:#ffffff;padding-bottom:30px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" style="padding:20px 30px 5px 30px;text-align:center;">
<p style="margin:0 20px;font-family:montreal-mediumregular, Lucida Grande, Lucida Sans Unicode, Tahoma, Sans-Serif; color:#000000;font-size:15px;line-height:25px;padding:20px 0px 25px 0px;text-align:left;">
Welcome back to the weekend If you’re looking for a break from the boring weekday work vibes, then why not try something new?
</p>
所以你会看到有很多次我试图包含它,但仍然没有运气。知道我在搞砸什么吗?