GT2/GT2-iOS/node_modules/react-native-vector-icons/lib/create-icon-set-from-icomoo...

18 lines
435 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
import createIconSet from './create-icon-set';
export default function createIconSetFromIcoMoon(
config,
fontFamilyArg,
fontFile
) {
const glyphMap = {};
config.icons.forEach(icon => {
glyphMap[icon.properties.name] = icon.properties.code;
});
const fontFamily =
fontFamilyArg || config.preferences.fontPref.metadata.fontFamily;
return createIconSet(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`);
}