Creating a cross browser icon webfont

后端 未结 4 661
梦毁少年i
梦毁少年i 2021-02-07 07:00

I have been making my own webfont taking as a starting point articles from web designer depot and intridea.

I know different engines render fonts differently and but the

4条回答
  •  无人共我
    2021-02-07 07:10

    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.

    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.

    Some reading:

    • 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

提交回复
热议问题