CDAT / jupyter-vcdat

A Jupyter Lab extension based on vCDAT.
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Update ps export to allow text as text objects rather than glyph #102

Open durack1 opened 5 years ago

durack1 commented 5 years ago

Currently the *.ps export does not export text objects as text types, rather these are glyphs which are not recognized by vector image editing software to allow direct text editing.

Please update to allow text objects as text

durack1 commented 5 years ago

It appears the *.pdf does export text as text objects (checked in Illustrator), so we're close

doutriaux1 commented 5 years ago

@scottwittenburg I wonder i it's because of ghostscript?

doutriaux1 commented 5 years ago

@scottwittenburg the vcs' psotscript dunction has:

    def postscript(self, file, mode='r', orientation=None,
                   width=None, height=None, units='inches', textAsPaths=True):

Did you get rid of textAsPath when switch to contextGL ?

scottwittenburg commented 5 years ago

@doutriaux1 I suspect what you suggested was true, that it's due to how we have to use ghostscript now in order to support saving a postscript. The only way I think we could support textAsPaths is if there's a command-line option available in ghostscript. Maybe we should remove that argument in that case?

durack1 commented 5 years ago

Folks from memory textAsPaths is exactly what we don't want, as if this is selected the text is converted into glyphs which often bloats out file sizes considerably (as each vector element needs to be defined) rather than just having an ascii character represented in the file (and the screen).

I remember working with @dlonie (who seems to have deleted his github account) on this and note there are a bunch of now old and closed issues buried in other repos https://github.com/CDAT/cdat/pull/1013 https://github.com/CDAT/cdat/issues/517 https://github.com/CDAT/cdat/issues/1077 https://github.com/CDAT/vcs/issues/47 etc

scottwittenburg commented 5 years ago

@durack1 Is illustrator something I can use for free?

scottwittenburg commented 5 years ago

@durack1 Do you know of another tool (besides Illustrator which is not free) I can use to get a better feel for what ghostscript is producing from our pdfs, compared to what we want it to produce?

durack1 commented 5 years ago

@scottwittenburg try https://inkscape.org/

scottwittenburg commented 5 years ago

Thanks @durack1, will do.