canvas icon indicating copy to clipboard operation
canvas copied to clipboard

Feature request: PostScript Parser

Open cornejong opened this issue 10 months ago • 2 comments

Would be great if there was also support for parsing PostScript.

cornejong avatar Apr 07 '24 11:04 cornejong

I agree that would be a good addition. There is already quite some code related to (compressed) PostScript inside OTF fonts in https://github.com/tdewolff/font/blob/master/sfnt_cff.go#L259, the only difference would be reading a text encoded stream and expanding the operator set. The complete operator set is fairly big though. This would open the door to converting EPSs and PDFs to Canvas (rendering EPS and PDF files), and further integration with the TeX tool set.

What is your use-case out of curiosity?

Additionally, I wish to improve the SVG to Canvas functionality, it's quite ad-hoc at this point. Unfortunately I don't have much free time to add new features soon, though I prioritize fixing bugs...

tdewolff avatar Apr 07 '24 21:04 tdewolff

Currently working on a project for a client where we need to generate raster preview images for a bunch of different, customer supplied, input file formats (eps, svg, ai, psd, pdf, etc..) and trying to keep it all in pure go. So not really touching the majority of the functionality. Althouh i seem to find new usecases for it everyday since i discoverd it.

I'm kinda new to the whole "working with graphics". But it caught my interest.

Yeah totaly agree on prioritizing bug fixes over new features. I might see if i can find/make some time to dive into this. Could be a fun project to divert some time to. Although my spare time seems to shrink by the minute, but i'll see.

cornejong avatar Apr 08 '24 09:04 cornejong