html字体整体偏移,CSS自定义字体垂直偏移(错误?)

你可能没有做错任何事情.以下是一些可能适用的要点,有些可以由您控制,有些则不可以.

>为了确保,明确设置vertical-align:baseline.

>不同的文件(.eof,.woff,.ttf)本身可能没有相同的定义,因此不同的浏览器使用不同的文件并显示差异.

>不确定是否有两个src调用搞乱了,但你可以尝试删除第二个:

@font-face {

font-family: 'Gabriola';

src: url('Gabriola.eot'),url('Gabriola.eot?#iefix') format('embedded-opentype'),url('Gabriola.ttf') format('truetype');

font-weight: normal;

font-style: normal;

}

这些都只是猜测.你将不得不测试#1,3.如果问题是#2,我不确定是否有一个优雅的解决方案.

当然,有关于this site的警告:

Keep in mind that font rendering can vary widely across browsers and

operating systems. Many developers have experienced such poor results

from Windows and Internet Explorer that they avoid using custom fonts

altogether. Always be sure to examine your results closely on all the

browsers that you can to decide if the quality is acceptable.

更新

This post给出了一些可能解决渲染问题的技巧.这是Font Squirrel,他特别指出:

If you downloaded the kit,you might try regenerating the font with

the generator. We make periodic adjustments to the generator that

might improve the hinting or rendering of the font.

但他也证实,

Not to pass the buck,but the most common cause is a bad original

font.

这与我的观点#2相符.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值