cognitom / symbols-for-sketch

Symbol font templates for Sketch.app
679 stars 76 forks source link

Doesn't work since Sketch 3.5 #26

Closed peacepostman closed 8 years ago

peacepostman commented 8 years ago

Hello,

I've send a request to BohemianCoding in order to figure out what have change in Sketch/Skecth Tool, but personnally symbols-for-sketch doesn't work anymore since last update (3.4 -> 3.5).

In fact, it work out of the box, without editing or opening anything, but once i open a sketch file, nothing is rendered in the dist folder.. I dont know what new behaviour cause this issue but if someone here have a clue i'll be glad to read it :)

Best regards

cognitom commented 8 years ago

@peacepostman thanks for letting me know! I'm bit busy for client work until next week... I haven't check 3.5 yet ><

If somebody knows workaround, pls share your idea. And of course PR is always welcome. Thanks ;-)

pudgereyem commented 8 years ago

Just letting you guys know that it doesn't work for me either. Any workaround yet? :) Thanks.

peacepostman commented 8 years ago

Some news from bohemianCoding,

I will just paste the mail content here :

We’re now bundling SketchTool inside Sketch. You can always find the latest version inside the app bundle (in Sketch.app/Contents/Resources/sketchtool) and install it from there.

Hope it helps!

Hope it helps too :)

johnmartin commented 8 years ago

@peacepostman @pudgereyem OK, I've had this problem too. It appears to be related to something todo with the fact that since Sketch 3.5 gulp-iconfont is not generating the correct unicode characters and therefore the generated CSS isn't playing nicely. I can't tell where the fault is at... BUT I've come up with a workaround (that works for me at least, until someone can up with a proper fix):

Basically you convert your unicode glyphs into their hexadecimal format and then use those within your generated CSS. I've done this by updating my gulp task as follows:

In your gulpfile.js:

// Imagine the normal gulp task for generation of files before here
.on("glyphs", function(glyphs) {
  for (var i in glyphs) {
    glyphs[i].hex = glyphs[i].unicode.toString().charCodeAt(0).toString(16);
  }
  // ... now carry on normally

In your css template: instead of using content: "<%= glyph.uncode %>" you'll need to use content: "\<%= glyph.hex %>"

For reference here's an example gist of it working: https://gist.github.com/johnmartin/0110aca0d00287d6f157

peacepostman commented 8 years ago

Thanks @johnmartin , I will give it a try and keep you updated.

pudgereyem commented 8 years ago

Hey @johnmartin, @peacepostman and @cognitom.

I didn't get it to work the way @johnmartin suggested.

However, I went to https://github.com/cognitom/gulp-sketch and found this issue; https://github.com/cognitom/gulp-sketch/issues/22 on the same problem. See @jackkeller's answer; https://github.com/cognitom/gulp-sketch/issues/22#issuecomment-179474461

Apparently the sketchtool is now included inside the app according to sketchapp.com/tool/. So by installing it from the route that they suggested I got it to work. You can check the changelog for sketchtool by writing sketchtool notes and there you should see (if you scroll up) a note for version 3.5.

Worked for me!

thabti commented 8 years ago

Guys just remove sketchtool from /usr/local/bin and install it as shown here :http://www.sketchapp.com/tool/

Worked like a charm .

peacepostman commented 8 years ago

Yep ! I couldn't add my feedback too for timing reasons, but install local sketchTool solves everything :)

@cognitom Issue closed I think, maybe add a note on readme for further issues and change gulp-sketch install method.

cognitom commented 8 years ago

Hi guys, at last I got the time to fix some issues around Sketch.app 3.5.

@johnmartin thanks for letting us know the fix on Unicode issue. Feel free to send PR :-) https://github.com/cognitom/symbols-for-sketch/blob/v2.0.0/gulpfile.js#L66