r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Postscript] Emitting Postscript from REBOL

Graham
15-Apr-2006
[611]
For those without postscript printers, using the free version of 
rops.exe might be a solution for them.
Henrik
15-Apr-2006
[612]
there is a free version?
Graham
15-Apr-2006
[613x5]
I'm hoping someone who knows more about draw can fix this for me 
:)
free version of rops is level 1 ps.
the versions that cost do level 2 and 3.
http://www.rops.org/download/freescript53.exewhich is the free version 
for windows
I got the impression that AGG draw is skewed a little to assist producing 
SVG graphics .. but there's a strong case to support postscript better 
instead.
Geomol
15-Apr-2006
[618]
Looks good, Graham. I hope to get time one of the comming days to 
investigate PS a little more, so the dialect can be more complete. 
I like your idea about getting rid of blocks, and I hope to make 
a consistent version with few blocks, maybe only for font.
Gabriele
15-Apr-2006
[619]
text in draw can only be transformed if rendered in vector mode
Graham
15-Apr-2006
[620]
changing the text to vector mode now has the text obeying the rotation.
Henrik
15-Apr-2006
[621]
did you upload that one?
Graham
15-Apr-2006
[622x9]
no.
text: [err:
		set txt string! (
			fontcount: fontcount + 1
			set to-word join "font" fontcount  make face/font compose [
				 size: (fontsize) 
				 name: (fontname) 
				 color: (rgb)
			] 
			pos/y: pos/y - fontsize

   repend output  [ 'font (to-word join "font" fontcount) 'pen rgb 'text 
   'vectorial txt pos ]
		) 
	]
Of course vector fonts look quite different.
So, I can't see much use for my purposes.
Times-Roman
 "Times New Roman"
		"Courier" 		"Courier New"
		"Helvetica-Oblique" "Arial Italic"
		"Helvetica" "Arial"
		"Times-Oblique" "Times New Roman Italic"
		"Helvetica-Oblique" "Arial Italic"
		"Courier-Oblique" "Courier New Italic"
		"Times-Bold" "Times New Roman Bold"
        "Helvetica-Bold" "Arial Bold"
		"Courier-Bold" "Courier New Bold"
		"Times-BoldOblique" "Times New Roman Bold Italic"
		"Helvetica-BoldOblique" "Arial Bold Italic"
		 "Courier-BoldOblique" "Courier New Bold Italic"
Can someone check these to see if they are correctly matched ?  The 
left hand is the postscript font, and the right hand is the true 
type font
I'm not sure about Times ...
these http://www.rops.org/download/std35ttf.zipare the ghostscript 
GNU fonts equivalent to the 35 postscript fonts
so, you can install these and get pretty exact matching.  You'll 
have to change the lookup table above.
Maxim
15-Apr-2006
[631]
I always thought arial was wider than Helvetica in aspect... but 
I've never really compared them to see if they are really the same 
font...
Graham
15-Apr-2006
[632]
I'm pretty sure they're supposed to be equivalent.
Maxim
15-Apr-2006
[633]
IIRC when I was trying to match linux fonts to windows... arial and 
helvetica where pretty different when applied over each other...
Graham
16-Apr-2006
[634x2]
Sigh .. looks like I need a better way to map postscript points to 
the draw coordinate system.
Gabriele .. any hints?
Henrik
16-Apr-2006
[636]
would it be possible to use caret-to-offset?
Graham
16-Apr-2006
[637x2]
I need some fudge factor .. at present I am off by a little high 
and to the right.
I am previewing my draw doc, and when I generate the ps file, the 
coordinates are to the north-east in the ps file.
Henrik
16-Apr-2006
[639x2]
could it be an aspect ratio problem?
or is the offset constant all over the drawing area?
Graham
16-Apr-2006
[641x14]
so presumably I have to reduce them a little in the south-west direction
I'm not sure.  I guess I should try a scientific method of determing 
this.
ie. draw a grid and see what happens
at present, I am keeping the x as is, and just reducing the y by 
the size of the page
so an a4 page which is 595x842 points, 0x0 becomes 0x842
This Rops viewer is very demanding .. doesn't like the postscript 
I am emitting, but ps2pdf works fine :(
Agghh.. maybe the mapping is okay after all!
Using my "postscript" draw viewer at 83%, it looks almost exactly 
the same as the RoPS viewer at 60%.  So, the mapping is pretty accurate. 
 I was being fooled by the acrobate conversion which is not so accurate.
try this out ...
do http://www.compkarori.com/reb/psd2draw.r
when you click on the "print" button, it generates a test.ps file 
which is the postscript "equivalent" of the stuff on screen ... except 
for the rotated objects
which are not placed correctly.
I map the standard postscript fonts to the free GNU postscript equivalents 
in that zip file I mentioned.
true type equivalents ie.
Henrik
16-Apr-2006
[655]
ok
Graham
16-Apr-2006
[656]
I am a little confused about some of these ps fonts - sometime it's 
called BoldItalic, and other times it's called BoldOblique
Henrik
16-Apr-2006
[657x2]
http://www.hmkdesign.dk/chestmark.pdf<-- an old version of the chestmark
but this is basically what I need to do
Graham
16-Apr-2006
[659x2]
It looks doable to me.
You don't actually have to change to using my dialect.