svg2iconfont-rn
v1.0.3
Published
svg2iconfont
Downloads
6
Readme
SVG to Icoinfonts
A collection of font icoins of projects.
Installation
npm i svg2iconfont-rn --save
Use In Web
Paths of resouces css
/dest/css/{fontName}.css
fonts
/dest/fonts/{fontName}.eot
/dest/fonts/{fontName}.ttf
/dest/fonts/{fontName}.woff
glyphmaps
/dest/glyphmaps/{fontName}.json
Use In React Native
For example:
import { Test } from "svg2iconfont/react-native";
...
<Test name="test" size={26} style={{ marginBottom: -3 }} color="blue" />
The icon is downloaded from icons8
Develop
- Clone this repo
npm i --dev
- Place your svg icons in
/svg/{fontName}
for example:gulp --fontName {fontName} --className {className} --fontPath {fontPath}
gulp --fontName test --className ts --fontPath "../fonts/"
- Add the font to /react-native/index.js if you want
Preview
/dest/index.html
About gyp error
There was a hard time when I install and build the module ttf2woff2, so I zipped this module(OS Win7 64bit) as attachment in /attachment/ttf2woff2.rar.