SVG image doesn't render correctly when run through svg2ttf
qfulsher opened this issue · 1 comments
I'm trying to create a series of icons backed by SVG images. All of the SVGs work well except for this one. Here's the SVG in question: lftnav-equipment.zip. It may have been generated incorrectly by the tool used to draw it, although chrome seems to render the original SVG just fine.
I'm using the gulp-iconfont
library to do the conversion from SVG => .scss / woff file.
here's the gulp task I'm using:
var gulp = require('gulp');
var iconfont = require('gulp-iconfont');
var svgmin = require('gulp-svgmin');
var consolidate = require('gulp-consolidate');
gulp.task('svg2ttf', function() {
return gulp.src(['src/icons/assets/svg/*.svg'])
.pipe(svgmin())
.pipe(iconfont({
fontName: 'lx',
prependUnicode: true,
normalize: true,
fontHeight: 1000,
formats: ['ttf']
})).on('glyphs', function(glyphs, options) {
gulp.src('src/lx.template')
.pipe(consolidate('lodash', {
glyphs: glyphs,
fontName: options.fontName,
}))
.pipe(gulp.dest('./out'));
})
.pipe(gulp.dest('./out'));
});
At the end of the process the font turns out showing up as a black box rather than the actual icon. I'm converting ~200 icons via this process, this is the only one that's showing this behavior.
https://github.com/fontello/fontello/wiki/How-to-use-custom-images
Data should be prepared properly and be simple path, without references. Use fontello for quick-check.