UNPKG

@expo/vector-icons

Version:

Built-in support for 10 popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.

18 lines (14 loc) 435 B
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`); }