Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Stroke/Fill Ghostscript
When I ask for an outline on my text, my typesetting application
generates postscript using the classic save-stroke-restore-fill
technique.

"charpath gsave stroke grestore fill"

I need to convert the characters into paths, however.  So I ran the
postscript through ghostscript.

Ghostscript's output actually creates one path for the fill and a
completely different path for the outline.  Visually, it's
indistinguishable, but that means I get two objects in Illustrator
instead of one.

(Why do I care?  Fair question.  I have a vendor with very special
requirements.)

Is there some kind of automated tool that will convert my characters
to a path and still use the "gsave-stroke-grestore-fill" approach?
Can I do it with Ghostscript if I use special parameters?

Report this thread to moderator Post Follow-up to this message
Old Post
Adam Augusta
03-28-08 12:28 AM


Re: Stroke/Fill Ghostscript
In article <e1b412b3-8fbf-4c14-be18-88c7d77a72a3
@d4g2000prg.googlegroups.com>, roxton@gmail.com says...

> "charpath gsave stroke grestore fill"
>
> I need to convert the characters into paths, however.  So I ran the
> postscript through ghostscript.

Sounds like you are using the pswrite device to do this ?


> Ghostscript's output actually creates one path for the fill and a
> completely different path for the outline.  Visually, it's
> indistinguishable, but that means I get two objects in Illustrator
> instead of one.

But that is exactly what your example does too, except that the path is
saved and restored, rather than written twice.


> Is there some kind of automated tool that will convert my characters
> to a path and still use the "gsave-stroke-grestore-fill" approach?
> Can I do it with Ghostscript if I use special parameters?

The current version of pdfwrite in GS (8.62) attempts to spot this kind
of construction and replace it with a Text render mode (Tr) in the
output PDF. Since ps2write is based on pdfwrite, the same should be true
for PostScript output using ps2write, though I haven't specifically
tested that. It depends on how the file opdfread.ps deals with text
render modes.

If you are using pswrite then no, there is no means for doing this as
far as I know.

Ken

Report this thread to moderator Post Follow-up to this message
Old Post
ken
03-28-08 09:47 AM


Re: Stroke/Fill Ghostscript
Would  /fill /newpath load def , that simply kills all the fills, help?

Report this thread to moderator Post Follow-up to this message
Old Post
jdaw1
03-29-08 12:22 AM


Re: Stroke/Fill Ghostscript
On Mar 28, 4:13 am, ken <k...@spamcop.net> wrote:
> In article <e1b412b3-8fbf-4c14-be18-88c7d77a72a3
> @d4g2000prg.googlegroups.com>, rox...@gmail.com says...
> 
>
> The current version of pdfwrite in GS (8.62) attempts to spot this kind
> of construction and replace it with a Text render mode (Tr) in the
> output PDF. Since ps2write is based on pdfwrite, the same should be true
> for PostScript output using ps2write, though I haven't specifically
> tested that. It depends on how the file opdfread.ps deals with text
> render modes.

Hmm, this might work.  A PDF would be an acceptable deliverable here.

I downloaded and compiled 8.62 on my Windows box.  The behavior of the
system changed dramatically, however.  The -dEmbedAllFonts=true option
isn't working; the characters are always being converted into paths
when I use the PDFWrite device.  I'll investigate more tomorrow.

-Adam

Report this thread to moderator Post Follow-up to this message
Old Post
Adam Augusta
03-29-08 12:22 AM


Re: Stroke/Fill Ghostscript
In article <c7361dd3-76df-459b-88ff-
8803daa866cf@m36g2000hse.googlegroups.com>, roxton@gmail.com says...

> I downloaded and compiled 8.62 on my Windows box.  The behavior of the
> system changed dramatically, however.  The -dEmbedAllFonts=true option
> isn't working; the characters are always being converted into paths
> when I use the PDFWrite device.  I'll investigate more tomorrow.

Interesting, that certainly doesn't happen for me. What system are you
using ? I'm running on a Windows box, and build GS with VC++ 8. I
haven't tried the -dEmbedAllFonts switch though, its possible that has
become broken. If so, you should raise a bug report.



Ken

Report this thread to moderator Post Follow-up to this message
Old Post
ken
03-29-08 09:40 AM


Re: Stroke/Fill Ghostscript
On Mar 29, 5:00 am, ken <k...@spamcop.net> wrote:
> In article <c7361dd3-76df-459b-88ff-
> 8803daa86...@m36g2000hse.googlegroups.com>, rox...@gmail.com says...
> 
>
> Interesting, that certainly doesn't happen for me. What system are you
> using ? I'm running on a Windows box, and build GS with VC++ 8. I
> haven't tried the -dEmbedAllFonts switch though, its possible that has
> become broken. If so, you should raise a bug report.

Sorry, I misinterpreted what was happening.  Regardless of my
GhostScript version, I get paths if my document outlines the text and
strings if it doesn't.  That's because in the former case, the
charpath operator is used, and in the latter case it's not.  I was
hoping to get lucky and that pdfwrite in 8.62 would interpret the
charpath/gsave/stroke/grestore/fill construct as an opportunity to use
text rendering, but nope.

Thanks for your help, Ken.  I'll poke around for more information
about that 8.62 functionality you mentioned, but I'm mostly reconciled
to not finding the voodoo needed to achieve my, uh, domain-specific
requirements. :)

-Adam

Report this thread to moderator Post Follow-up to this message
Old Post
Adam Augusta
04-01-08 09:45 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PostScript archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:40 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.