css - 为什么我的字体在 Web 上看起来与在 ttf/woff 文件中看起来不同?

标签 css font-face

This is what the font should look like.
Here's what the font looks like in the .ttf file.
And this is what the font looks like on my website.

#top {
    margin:             30px 30px 0px 150px;
    border:             3px solid maroon;
    text-align:       center;
    height:             130px;
    background:     url(text/dumbledore.gif) right no-repeat, url(text/gandalf.gif) left no-repeat, url(text/tenor.gif) center;
}

@font-face {
    font-family: 'Beyond Wonderland';
    src: url('fonts/BeyondWonderland.eot');
    src: url('fonts/BeyondWonderland.eot?#iefix') format('embedded-opentype'),
        url('fonts/BeyondWonderland.woff2') format('woff2'),
        url('fonts/BeyondWonderland.woff') format('woff'),
        url('fonts/BeyondWonderland.ttf') format('truetype'),
        url('fonts/BeyondWonderland.svg#BeyondWonderland') format('svg');
    font-weight:  normal;
    font-style:   normal;
}

h1#title-text {
  font-family:  'Beyond Wonderland';
  border:       none;
  font-size:    450%;
  width:        100%;
  text-shadow:  1px white;
  color:        black;
  text-align:   center;
  padding:      20px 0px 20px 0px;
  margin:       auto;
}
    <div id="top">
        <h1 id="title-text" title="You are viewing the home page">Welcome to the Erevrast Home Page!</h1>
    </div>

最佳答案

text-shadow 甚至适用于字体中最微弱的线条,因此艺术字体中的每个污迹/刮痕最终都会有一个 1 像素的白色阴影。尝试删除 text-shadow: 1px white;

关于css - 为什么我的字体在 Web 上看起来与在 ttf/woff 文件中看起来不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67666459/

相关文章:

html - float 框旁边列表的左边距

css - @font-face 在 IE8 中不工作,但在 chrome、firefox 中工作?

jquery - 如果页面高度动态变化,带 id 的链接不起作用

php - 返回但未显示的 jQuery 自动完成数据

css - 如果在 CSS 中使用后备字体,我可以使用触发器吗?

html - 自定义字体在 Mac OS X 上看起来不同(更高)

css - Mac 系统字体@font-face 问题

css - @font-face 不适合我

javascript - 如何在 jQuery 同步浏览器阻止 POST 期间更改光标?

javascript - 动态添加边框时防止元素移动