-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable postscript export to write text objects in addition to text as paths (shapes) #1537
Comments
Just to comment on a point made in #1527, the "text object" mode should not be the default. Leave "text as paths" as the default. The original VTK vector export implementation in VCS exported text objects and it caused problems. In particular, some vector formats do not support alignment/rotation of text, and embedding the objects results in portability issues as fonts vary greatly across viewers and platforms. To keep things consistent, we decided to export as paths, since that avoids all of these issues. As for filesize, every large ps/pdf I've been sent to inspect shows the vast majority of the file to be comprised of high-resolution polygonal data from the plot, while text took up a negligible amount of space. The only way around that is to rasterize the plot into the image or downsample the data prior to exporting. |
@dlonie I was thinking of simply add it to the psotscript function, so it would be on by default for postscript only. I will test with @durack1 as is and if it creates too many issue will put it back as OFF by default. Does that sound good? |
@doutriaux1 I think @dlonie was recommending leaving the default as is, but exposing the write text as |
What @durack1 said :-) |
@danlipsa @doutriaux1 @aashish24 this would seem to be a very simple addition to the export postscript function - I'd be happy to kick the tyres on this once a branch is in place to test. |
@dlonie if we switch to opengl2 backend, would that be giving us text objects or still shapes? |
Either -- See vtkGL2PSExporter::SetTextAsPath(bool). If true, all text will be exported as paths. If false, 2D non-math text will be embedded as a text object (3D or mathtext strings will still be paths, though). This is the case for both VTK OpenGL backends. |
@doutriaux1 @aashish24 could this be moved to a |
@durack1 sure it sounds like a easy fix unless anyone else objects to it, I am in favor of putting in 2.6. |
So I verified that for both pdf and postscript we are exporting text as paths. Also checked the code that the flag is present. Both PDF and Postscript text line: 1098 (master as of today).
The docs are attached I am closing this bug if I am mistaken please feel free to ping me on it. |
Oops.. I just realized that @durack1 wants the text object. Okay, I will add an option to vcs and set the default to text object. |
@aashish24 yes, I was about to ping you on that! I thought the issue title made things clear. Rather than just change the default without testing, can we test out the options to see how the outputs look first? I'd be happy to provide feedback |
As discussed in #1527 the current
postscript
export function writes text objects as shapes, rather than encoded as text objects.It would be preferable to expose the ability to export text as text/string objects, which will provide better control when importing
postscript
output files into vector graphics editing software (such as Adobe Illustrator).Further discussions are included in #1527 - in particular here
@dlonie can describe what needs to be exposed - a potential upside is that file sizes may be reduced (#517)
The text was updated successfully, but these errors were encountered: