FontAwesome字体的基准字体高度是多少

FontAwesome字体的基准字体高度是多少

本文介绍了FontAwesome字体的基准字体高度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个包含FontAwesome图标的字体图标,并创建了一个 Icomoon应用设置的免费icomoon图标.该应用程序中的默认基准为6.25%.

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% .

当我比较icomoon应用程序中的默认FontAwesome图标和FontAwesome图标时,它们之间的距离为px.在下图中,上的按钮使用默认的FontAwesome字体,上的按钮使用与icomoon应用创建的相同字体图标.

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.

您可以看到右侧按钮中的图标上升了2px左右.

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

他们的CSS几乎相同,并且使用FontAwesome CSS不会改变基线已关闭的事实,并且我不想通过CSS进行调整

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

FontAwesome

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

您知道FontAwesome使用什么基线吗?

Do you know what baseline is FontAwesome using ?

推荐答案

FontAwesome使用的基线高度约为em高度的14%.通过查看FontAwesome提供的SVG字体的代码,您可以自己找到答案.

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.

这篇关于FontAwesome字体的基准字体高度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 11:32