在一个@ font-face中合并多个字体文件

时间:2014-07-18 08:11:06

标签: css fonts font-face

我有以下代码:

@font-face {
  font-family: 'icomoon';
  src:url('../fonts/icons/icomoon.eot?2hq9os');
  src:url('../fonts/icons/icomoon.eot?#iefix2hq9os') format('embedded-opentype'),
  url('../fonts/icons/icomoon.woff?2hq9os') format('woff'),
  url('../fonts/icons/icomoon.ttf?2hq9os') format('truetype'),
  url('../fonts/icons/icomoon.svg?2hq9os#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

现在,问题是我被迫使用多个图标集(来自多个文件),并且为了我的方便和干净的结构,我希望只在一个'icomoon'中拥有所有这些图标(来自所有文件)字体面。

例如:if:

../fonts/icons/icomoon.* includes icon-1 / icon-2 and icon-3

and 

../fonts/icons/customicon.* includes icon-4 / icon-5

如何在

中包含所有这些内容
@font-face {
  font-family: 'icomoon';
  -- include multiple files --
}

div#selector { // will have con-1 / icon-2 / icon-3 / icon-4 / icon-5
  font-family: icomoon; 
}

可能吗?

1 个答案:

答案 0 :(得分:1)

我认为为此你可以使用IcoMoon PLugin。 有了它,您可以创建一个自定义字体,将FontAwesome与您的图标组合在一起。

相关问题