glyphr-studio / Glyphr-Studio-1

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

SVG Export fails without any error message #306

Closed jeremy-w closed 1 year ago

jeremy-w commented 4 years ago

When I attempt to export the attached Glyphr Studio project as an SVG font, the "exporting" toast appears, but no progress is reported (none of the "exporting glyph X" stuff that I see with OTF export), and eventually it just fades away without any file having been downloaded. No error is reported in the UI - it just quietly fails.

OTF export does produce a font file, but I really want my kerning to survive export. (Suggestions for what to use to go from SVG to OTF font are welcome. :D )

I see an error in the console when I attempt SVG export:

TypeError: getSelectedWorkItem(...).getLSB is not a functiononline:49:279870
    makeSVGpathData https://www.glyphrstudio.com/online/:49
    getSVGpathData https://www.glyphrstudio.com/online/:49
    getSVGpathData https://www.glyphrstudio.com/online/:49
    makeSVGpathData https://www.glyphrstudio.com/online/:49
    getSVGpathData https://www.glyphrstudio.com/online/:49
    ioSVG_makeMissingGlyph https://www.glyphrstudio.com/online/:49
    ioSVG_exportSVGfont https://www.glyphrstudio.com/online/:49

(Everything blames line 49, since the script was minified into one very, very long line.) Orthic Sans - Glyphr Project - 2020.4.18-11.33.15.txt

mattlag commented 4 years ago

Hello! This seems like a bug. I'll look into it sometime this weekend.

mattlag commented 4 years ago

Hey, I just tried to export your project to SVG, and it worked. I'm on Windows, and I tried FireFox and Chrome. What OS / Browser are you using?

jeremy-w commented 4 years ago

I’m on latest macOS and beta Firefox. (I’m not at my laptop to provide exact versions.)

I’ll try again with a fresh import from that saved file next time I get a chance; I’d assumed it would repro with that, but I hadn’t checked. Some of the glyphs were SVG imports - I pasted in some exported SVG glyphs from Fira Regular. Those all had transforms applied that were ignored but perhaps could have complicated things.

I’ll see if I can repro and update next chance I get.

jeremy-w commented 4 years ago

Cannot reproduce from that file. Apparently whatever was wonky did not survive the save-as-txt and import. I'll see if I can repro with some copy-paste work instead.

I do see an error when I first visit https://www.glyphrstudio.com/online/, though:

Screen Shot 2020-04-19 at 12 01 00

Corresponding console log:

XML Parsing Error: no root element found
Location: https://www.glyphrstudio.com/online/
Line Number 1, Column 1:

Configuration

Firefox 76.0b5 (64-bit) ProductName: Mac OS X ProductVersion: 10.15.4 BuildVersion: 19E287

jeremy-w commented 4 years ago

Couldn't repro with importing just the at sign. Wonder what I did to break it. But if export and then re-import works as a workaround, WFM.

Sorry for the trouble!

mattlag commented 4 years ago

Yeah, definitely send me any SVG file that causes error on import. Or if you're able to repro the original problem. Those are usually quick fixes if I have the file to work with.

Thanks!

clbrsantana commented 3 years ago

I have the same problem. SVG exporting fails without any error message, and the console shows the exact same exception @jeremy-w pointed out.

I'm on macOS 10.14.6. Tried chrome, firefox developer edition and safari. Same thing on all of them. Rubik - APIS - Glyphr Project - 2021.4.1-20.05.17.txt

I also tried exporting then reimporting both OTF and TXT then exporting as SVG with no success :( (Exporting OTF and Saving txt file works as expected).

Actually the only reason I want to SVG export is to keep the kerning pairs settings. I'm going to convert to WOFF2 format afterwards.

I have a windows laptop here, will try SVG exporting on it and come back to tell if it works.

mattlag commented 3 years ago

I will take a look at your project - I can turn on some additional reporting in the SVG library to see what's going on.

clbrsantana commented 3 years ago

Whoa, that's fast! haha

Same thing on chrome on Windows here. I tried even android over 3g haha! I forgot to mention, but I also tried opening those examples on glyphrstudio.com/online page. They open normally, but I can't export them in SVG.

I don't know what else could trigger this problem in all these different browsers and OSs. It doesn't seem to make any sense, but maybe it has something to do with language or localization? I'm from Brazil. OS is set to Brazilian Portuguese.

mattlag commented 3 years ago

I know what could cause an issue on all browsers / OSes... A bug in the code! 😄 I know more once I dig into the source with your project loaded.