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

.svg files are being placed in wrong location #16

Closed
tatemz opened this issue Jun 8, 2016 · 15 comments
Closed

.svg files are being placed in wrong location #16

tatemz opened this issue Jun 8, 2016 · 15 comments

Comments

@tatemz
Copy link

tatemz commented Jun 8, 2016

Perhaps this is a problem with fontgen itself, but all of the .svg files are being generated and placed into the directory from which gulp is running (or rather from where gulp has called node).

I have properly configured my task with a valid dest option:

gulp.task('fontgen', function() {
  return gulp.src('app/fonts/**/*.{ttf,otf}')
    .pipe(fontgen({
      dest: "./dist/fonts/",
      css_fontpath: '../fonts/',
      embed: ['svg'],
    }));
});
@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

Technically we never officially supported embedding svg files. So Im changing the label to enhancement.

@sgen sgen added enhancement and removed bug labels Jun 9, 2016
@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

Feature added in dotcore64/fontfacegen@d9e87e6

@sgen sgen closed this as completed Jun 9, 2016
@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

Eh... I think this is still a bug. I removed the embed: ['svg'] and the issue still exists...

Here is how my project was compiled after my gulp run.

├── app
│   └── fonts
│       └── fontfile.ttf
├── dist
│   └── fonts
│       ├── fontfile.css
│       ├── fontfile.eot
│       ├── fontfile.svg
│       ├── fontfile.ttf
│       └── fontfile.woff
├── fontfile.svg <-- This is a clone and shouldn't be here
└── gulpfile.js

@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

I cannot reproduce this. What are your node, and gulp-fontgen versions?

@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

gulp-fontgen: ^0.1.7
npm: '2.14.12',
node: '4.2.6',

@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

Try updating to gulp-fontgen 0.1.8 and see if the issue persists.

@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

No luck... problem persists. 😢

@sgen sgen added the bug label Jun 9, 2016
@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

Which operating system are you using?

@sgen sgen reopened this Jun 9, 2016
@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

Docker for Mac (beta) using the node:4.2 docker image

I suppose it might be either Docker or the fact that I'm using 4.2...

@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

If your on Mac this might be related to dotcore64/fontfacegen#24

Ive just pushed the fix for that to npm. Try updating gulp-fontgen to 0.1.9 and see if the issue persists.

@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

No luck still... I'll see if I can find some time this evening to dive in and see what more debugging I can do.

Docker container should be linux based... so I doubt Mac specific issues are relevant here unless for some reason they are being translated through the Docker daemon.

@sgen
Copy link
Collaborator

sgen commented Jun 9, 2016

Alright. Im not sure how this is happening.

The target destination for the .svg is derived from the source file name and target destination provided in the configuration lib/fontfacegen.js, lib/configure.js.

And this is passed to tt2svg / batik-ttf2svg in lib/ttf2svg.js.

the embedding is handled in lib/stylesheets.js and svg encoding in encoding lib/encode.js.

drop some breakpoints / console.log()s in and see whats going on.

@tatemz
Copy link
Author

tatemz commented Jun 9, 2016

Gotcha. One thing to note is that it is duping the .svg files and placing one in the correct dest location and one where ever the gulpfile.js is.

@sgen
Copy link
Collaborator

sgen commented Jun 20, 2016

@tatemz Did you ever take a look at this?

@sgen sgen added this to the 1.0.0 milestone Jun 20, 2016
@sgen
Copy link
Collaborator

sgen commented Jun 24, 2016

Fixed by dotcore64/fontfacegen#36

@sgen sgen closed this as completed Jun 24, 2016
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