且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建跨浏览器图标webfont

更新时间:2023-11-27 22:01:04

这是一个复杂的问题,一个字体有三组这些。第一个集合,在'hhea'表中找到,通常特定于Mac。另外两个集合,在'OS / 2'表中找到与Windows(和Linux)相关。想法是让这些值均衡。我们的生成器有一个功能,称为奇怪的修复垂直指标,这是一个***的猜测在这些。请注意,Github使用Generator完成他们的图标。

This is a complicated question that involves something called vertical metrics. A font has three sets of these. the first set, found in the 'hhea' table, are generally specific to Mac. The other two sets, found in the 'OS/2' table relate to Windows (and Linux). The idea is to get these values equalized. Our Generator has a feature called oddly enough 'Fix Vertical Metrics' which does a best guess at these. Note that Github used the Generator for finishing their icons.

我知道这不与SVG字体,但我很确定这是你的问题所在。

I know this doesn't relate specifically to SVG fonts, but I'm pretty sure this is where your problems lie. Having different vertical metrics values screws up the baselines across platforms.

有些阅读:

  • http://blog.typekit.com/2010/07/14/font-metrics-and-vertical-space-in-css/
  • http://webfonts.info//webfonts-know-how/part-1-we-need-talk-about-line-height
  • http://code.google.com/p/googlefontdirectory/wiki/VerticalMetricsRecommendations