You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
490 B
20 lines
490 B
import createIconSet from './create-icon-set';
|
|
|
|
export default function createIconSetFromIcoMoon(
|
|
config,
|
|
fontFamilyArg,
|
|
fontFile
|
|
) {
|
|
const glyphMap = {};
|
|
config.icons.forEach(icon => {
|
|
icon.properties.name.split(/\s*,\s*/g).forEach(name => {
|
|
glyphMap[name] = icon.properties.code;
|
|
});
|
|
});
|
|
|
|
const fontFamily =
|
|
fontFamilyArg || config.preferences.fontPref.metadata.fontFamily;
|
|
|
|
return createIconSet(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`);
|
|
}
|