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

a quick export-import to Inkscape #208

Open gambhiro opened 9 years ago

gambhiro commented 9 years ago

While some of the SVG-editor type features are missing, would there be a way to do quick editing jobs in Inkscape?

Export a shape or a glyph to Inkscape, do some quick editing work there, and then importing it back in place? Ideally with only a couple of keystrokes, to not lose the flow.

I realize it might not be possible to get Javascript talk to Inkscape from a browser, but perhaps a dedicated Inkscape plugin could catch data from system clipboard, and get it ready to paste back to Glyphr. Maybe the Inkscape folks would have an idea how to structure an Inkscape plugin for this.

mattlag commented 9 years ago

From the browser Glyphr Studio can add text to the System Clipboard - this could be SVG. There is already fairly complete import / export SVG functionality in the code.

Have you tried 'Export SVG Font' option? Or, it sounds like you are talking about a smaller scale of just a single shape, or just the the shapes in a single glyph.

somewhat related would be #188 where the 'Import SVG' page isn't it's own page, but actually exists as a panel in a specific Glyph. So if you are editing a certain glyph, you could open up the 'import svg' panel and paste some code, and directly put those svg shapes in the current glyph.

gambhiro commented 9 years ago

Yes, smaller than the Export to SVG Font, just to work on individual shapes or a glyph.

The Import SVG page is great, but since SVG is so extensive, it takes some fighting in Inkscape to copy SVG that the Glyphr import will interpret reliably. Say, transform matrices have to be applied, individual shapes and component info need to be manually kept in sync, this sort of thing.

And so the idea is that an Inkscape plugin could smoothen this by passing Inkscape the SVG it needs, and passing back Glyphr the SVG or JSON it needs to keep things toghether.

I realize though that this is in the realm of proliferation :) -- this can be a lot of time to code, and really, the other editor features you have lined up will weaken or remove the need for this.

mattlag commented 9 years ago

... any chance you would be willing to code the Inkscape plugin? I have zero experience with that sort of thing (or anything outside of JavaScript, really) - plus the Glyphr Studio backlog is pretty extensive :-)

I do agree though that, at the very least, something involving SVG and the system clipboard would be easy to do from my end. And most of the hard work around import/export SVG is already done, so moving that functionality to a panel for a Glyph is basically just a UI addition - pretty easy.

I do like the idea of an Inkscape Plugin, though. I'm not sure what your background is, but any help (suggestions, advice, code contributions) is always incredibly appreciated!

gambhiro commented 9 years ago

Hm. It would be certainly interesting. Keep the issue open until its obsolete, if nothing else.

I have a serif font sketch which I'd like to be able to produce in Glyphr. I took a stab at it but it's just a bit beyond its editing features. I'll be travelling until the end of July, after that maybe I'll have time to google "Inkscape extension API" :)