Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startUnicode option overridden by prepended unicode #33

Closed
pindab0ter opened this issue Feb 4, 2016 · 3 comments
Closed

startUnicode option overridden by prepended unicode #33

pindab0ter opened this issue Feb 4, 2016 · 3 comments

Comments

@pindab0ter
Copy link

When I set the startUnicode: 0xEA02, the first generated glyph still shows unicode="".

This is the gulp task I've set up:

var gulp = require('gulp'),
    svgicons2svgfont = require('gulp-svgicons2svgfont');

module.exports = {
    task: function() {
        return gulp.src(['img/icons/**/*'])
            .pipe(svgicons2svgfont({
                fontName: 'my-icons',
                appendUnicode: true,
                startUnicode: 0xEA02
            }))
            .on('glyphs', function(glyphs, options) {
                console.log(glyphs, options);
            })
            .pipe(gulp.dest('fonts/'));
    }
};
@pindab0ter pindab0ter changed the title startUnicode option not working startUnicode option overridden by prepended unicode Feb 4, 2016
@pindab0ter
Copy link
Author

The problem was me using the appendUnicode setting which prepended (maybe change the name of the option?) the unicode to the filenames. The startUnicode setting is overridden by these prepended unicodes, making the setting useless after the first run.

@nfroidure
Copy link
Owner

I agree on the fact it should be prependUnicode, we could change this on the next major version.

Would an "ignoreUnicodePrefixes" option fit your use case?

@pindab0ter
Copy link
Author

I ended up not needing the feature, but it seems to me that the startUnicode overriding the file names should be default behaviour. I'll leave that decision up to you though, since I don't need it for my work flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants