What is the baseline font height of FontAwesome fo

2020-07-11 04:32发布

问题:

I created a font icons set with FontAwesome icons and free icomoon icons set with Icomoon app . The default baseline in the app is 6.25% .

When I compare default FontAwesome icons and FontAwesome icons from icomoon app they are off by few px. In the image below , the button on the left is using default FontAwesome font , the button on the right is using same font icon created with icomoon app.

You can see that the icon in the button on the right is up by 2px or so.

Their CSS is almost same and using FontAwesome CSS does not change the fact that baseline is off and I don't want to adjust this via CSS

icomoon

font-family: 'Myicons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;

FontAwesome

font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing:

Do you know what baseline is FontAwesome using ?

回答1:

FontAwesome uses a baseline height of about 14% (of the em height). You can find that out for yourself by looking at the code of the SVG font provided by FontAwesome.