glyphr-studio / Glyphr-Studio-1

Now deprecated, Glyphr Studio v1 served us well from 2010 to 2023.
https://www.glyphrstudio.com
1.07k stars 94 forks source link

Export SVG works from side bar but not from Export page #327

Closed jplarson closed 3 years ago

jplarson commented 3 years ago

When attempting to export the font in SVG, I'm getting the following JavaScript error:

Uncaught TypeError: getSelectedWorkItem().getLSB is not a function makeSVGpathData http://www.glyphrstudio.com/online/:49 getSVGpathData http://www.glyphrstudio.com/online/:49 getSVGpathData http://www.glyphrstudio.com/online/:49 makeSVGpathData http://www.glyphrstudio.com/online/:49 getSVGpathData http://www.glyphrstudio.com/online/:49 ioSVG_makeMissingGlyph http://www.glyphrstudio.com/online/:49 ioSVG_exportSVGfont http://www.glyphrstudio.com/online/:49 (Async: setTimeout handler) onclick

Exporting to OTF works fine, however.

mattlag commented 3 years ago

Hey, thanks for the bug. Could you also attach the Glyphr Studio Project File? That will be the best way for me to track the error back to whatever is causing it. Thanks!

jplarson commented 3 years ago

You bet! Here it is:

My Font - Glyphr Project - 2021.9.27-9.37.50.txt

Thanks!

mattlag commented 3 years ago

Hey @jplarson I just tried the project you sent. It successfully exports a SVG font with no errors. I tried it from the 'production' site glyphrstudio.com/online, and I also tried it in my local dev environment that gives me more error reporting... but both were successful.

Double check that this project is giving you an error - maybe also tell me what os/browser you are using? And just to confirm, you are using the web client not the desktop client? (the web client is actually more up to date)

jplarson commented 3 years ago

Hmm... odd!

Yeah, I'm using the online version at http://www.glyphrstudio.com/online/. Windows 10, same issue in both Chrome and FireFox.

Here's a loom video that shows the most basic case: starting a new font and going directly to doing the SVG export. The JS error that appears is the one I get in all other cases: https://www.loom.com/share/06dd6fb37d304bd7ad37bcf6560302fd

My best guess is that getSelectedWorkItem() is returning null (or some object that's not of the expected type) for whatever reason.

mattlag commented 3 years ago

Thank you for the video, it actually showed me something new which is a bug.

Good news is that Export SVG works if you use the Save icon on the left bar: image

The bug you found is that the export works from one place but not another... it's calling the same function, but it may be some page-level variable that is not available. Anyway, I'm going to change the title of this bug to accurately reflect what I have to do. but hopefully you are now unblocked for exporting SVG Fonts.

Let me know if you have any other questions!

mattlag commented 3 years ago

Also FYI I had version 1.13.11 finalized in GitHub, but not pushed up to glyphrstudio.com/online - this update may have actually fixed the issue, but I will confirm.

jplarson commented 3 years ago

Super sweet! Yeah, exporting to SVG from the left bar works like a charm, and indeed when I reloaded the whole thing it worked from that menu as well. Thank you so much!