{"action":"created","issue":{"url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/15","repository_url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts","labels_url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/15/comments","events_url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/15/events","html_url":"https://github.com/battlesnake/gulp-google-webfonts/issues/15","id":126753653,"number":15,"title":"Incorrect source paths generated in the CSS when used under Windows.","user":{"login":"allanbjorklund","id":16710122,"avatar_url":"https://avatars.githubusercontent.com/u/16710122?v=3","gravatar_id":"","url":"https://api.github.com/users/allanbjorklund","html_url":"https://github.com/allanbjorklund","followers_url":"https://api.github.com/users/allanbjorklund/followers","following_url":"https://api.github.com/users/allanbjorklund/following{/other_user}","gists_url":"https://api.github.com/users/allanbjorklund/gists{/gist_id}","starred_url":"https://api.github.com/users/allanbjorklund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanbjorklund/subscriptions","organizations_url":"https://api.github.com/users/allanbjorklund/orgs","repos_url":"https://api.github.com/users/allanbjorklund/repos","events_url":"https://api.github.com/users/allanbjorklund/events{/privacy}","received_events_url":"https://api.github.com/users/allanbjorklund/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-14T21:37:40Z","updated_at":"2016-04-18T15:32:43Z","closed_at":"2016-01-14T21:49:36Z","body":"When using this under Windows, the CSS generated has incorrect source paths.  I tracked the problem down to this function:\r\n\r\nfunction makeFontFace(request) {\r\n    request.name = path.join(options.fontsDir, request.name);\r\n    return template\r\n        .replace(/\\$(\\w+)/g, function (m, name) { return request[name]; });\r\n}\r\n\r\nThe error is that 'path' will use the local system's path separator when joining path elements.  The end result is that the web server treats the Windows '\\' as an escape character, and returns that there is no such file when trying to access the woff file. (Even when running under Windows.)\r\n\r\nThe fix is to change the path join statement to the following.\r\n\r\n    request.name = path.posix.join(options.fontsDir, request.name);\r\n\r\nThis will always use the '/' when joining the path elements, and will produce the correct source URL path in the CSS."},"comment":{"url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/comments/211433447","html_url":"https://github.com/battlesnake/gulp-google-webfonts/issues/15#issuecomment-211433447","issue_url":"https://api.github.com/repos/battlesnake/gulp-google-webfonts/issues/15","id":211433447,"user":{"login":"battlesnake","id":4949354,"avatar_url":"https://avatars.githubusercontent.com/u/4949354?v=3","gravatar_id":"","url":"https://api.github.com/users/battlesnake","html_url":"https://github.com/battlesnake","followers_url":"https://api.github.com/users/battlesnake/followers","following_url":"https://api.github.com/users/battlesnake/following{/other_user}","gists_url":"https://api.github.com/users/battlesnake/gists{/gist_id}","starred_url":"https://api.github.com/users/battlesnake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/battlesnake/subscriptions","organizations_url":"https://api.github.com/users/battlesnake/orgs","repos_url":"https://api.github.com/users/battlesnake/repos","events_url":"https://api.github.com/users/battlesnake/events{/privacy}","received_events_url":"https://api.github.com/users/battlesnake/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T15:32:43Z","updated_at":"2016-04-18T15:32:43Z","body":"It works for me using Node v5.10.1 and NPM v3.8.6 on Arch Linux - what distro are you using?"}}