Creating a cross browser icon webfont

后端 未结 4 660
梦毁少年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:07

    I used the Icomoon App to create the Emoji icon font as well as for creating custom icon fonts on a per project basis.

    The Icomoon App allows you to do each of the following :

    • Get one or more icons from several popular icon fonts
    • Upload other fonts, which may be icon fonts but also regular fonts
    • Upload SVG files to use as icons
    • Combine any number of icons from any number of available fonts
    • Set the UNICODE hex value for whichever characters you need
    • Export and/or save the font set you create

    Icomoon

    For more details, see Create webfont with Unicode Supplementary Multilingual Plane symbols.

    0 讨论(0)
  • 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
    0 讨论(0)
  • 2021-02-07 07:10

    There's a webapp, icomoon : http://icomoon.io/app/

    It make the job pretty well but you have to test the rendering of the different icons.

    They offert a lot of icons if you don't want do design everything.

    0 讨论(0)
  • 2021-02-07 07:16

    I had the same problem, and solved it by manually setting the metrics for all three types.

    You can see my working solution with screenshots of the settings here: https://stackoverflow.com/a/20609766/955413

    0 讨论(0)
提交回复
热议问题