Skip to main content
January 21, 2011
Question

How can you create postscript that Illustrator will accept as 'outlines' and not a text path?

  • January 21, 2011
  • 1 reply
  • 629 views

Hi,

I'm trying to write some postscript into an EPS that Illustrator CS2 will interpret the same way as if you were to create some text in Illustrator, and hit Type - Create Outlines, which converts the text to curves and makes it un-editable, and doesn't require the client to have that font installe, which is Helvetica.

This code fails to do so...

%!PS-Adobe-3.0 EPSF-3.0

%%Creator:

%%Title: None

%%CreationDate: 20/01/2011

%%DocumentData: Clean7Bit

%%Origin: 0 0

%%BoundingBox: 0 0 595 842

%%HiResBoundingBox: 0 0 595 842

%%CropBox: 0 0 595 842

%%LanguageLevel: 2

%%Pages: 1

%%DocumentMedia: A4 595 842 0 () ()

%%BeginDefaults

%%EndDefaults

%%EndComments

%%BeginProlog

%%EndProlog

%%BeginSetup

%%EndSetup

%%BeginPageSetup

%%EndPageSetup

/Helvetica-Bold findfont

dup

length 1 add

dict

begin

currentdict

copy

/PaintType 2 def/StrokeWidth 25 def

/Helvetica-Bold-O

currentdict definefont

pop

end

/Helvetica-Bold-O

60 selectfont

72 600 moveto

(Binky & Friends) show

showpage

%%PageTrailer

%%Trailer

%%EOF

As does this... (taken from the Blue Book)

% -------- Procedures --------

/Helvetica-Bold findfont

30 scalefont setfont

/oshow %stack: (string)

{ true charpath stroke } def

/circleofAdobe

{ 15 15 345

{ gsave

rotate 0 0 moveto

(Adobe) oshow

grestore

} for

} def

% --- Begin Program ---

250 400 translate

.5 setlinewidth

circleofAdobe

0 0 moveto

(Adobe Systems) true charpath

gsave 1 setgray fill grestore

stroke

showpage

Hope you can help,

Matt

This topic has been closed for replies.

1 reply

Mr__Horton
Inspiring
January 21, 2011

Matt,

In both examples the PostScript code is referencing the font before showing it on the page.

Unfortunately, as long as the EPS is referencing a font within itself, I don't believe you can get away from the font needing to be available.

I believe it is possible to transform the type (text strings to be rendered in a particular font) in a PostScript file to paths that can be stored in a completely new file that would be independent of the original fonts and their mechanisms, as long as the PostScript interpreter supports a file system. However, I don't believe you can insert PostScript language into an EPS file to accomplish the same feat internally. There is a logical issue here with fonts needing to be available at the same time the EPS file is run.

I wrote some PostScript code one time, based on examples from Adobe's blue, green, and red books, that would measure arbitrary contiguous path distances in PostScript files and report back the lengths of each. Based on that experience, I think that font character paths could be output into a file.

Still interested?

- Marvin