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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Graham
16-Apr-2006
[652x3]
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
[659x6]
It looks doable to me.
You don't actually have to change to using my dialect.
You can create the barcode in John's as an eps image, and insert 
it into the postscript.
I presume you don't really need to preview the barcode.
an eps file is just a postscript file which obeys certain conventions.
Anyways, I quite chuffed to get this preview and printing to postscript 
working ... after years of no way of printing from Rebol.
Henrik
16-Apr-2006
[665]
got a bit of a makeshift preview now. maybe I'll use it for the next 
version for the other races I'm doing this for
Graham
16-Apr-2006
[666]
So, you got mine working??
Henrik
16-Apr-2006
[667x3]
nope, I made a little layout that works like a preview
hand-made but it's enough
for now... later on I will be needing to create a real preview, so 
I'll be looking into it
Graham
16-Apr-2006
[670]
to get the ps dialect matching the draw dialect, I need to make the 
text obey cr/lfs.
Henrik
16-Apr-2006
[671]
fortunately I don't think I need that
Anton
17-Apr-2006
[672]
That's pretty good work Graham ! Well done guys.
Chris
17-Apr-2006
[673]
OT: How to Spot Arial -- http://www.ms-studio.com/articlesarialsid.html
Graham
17-Apr-2006
[674x2]
This is one of the main things that makes Arial look like Helvetica 
at first glance, even though the details are different.
At work today, and got a chance to try out the postscript printers. 
 It's amazing .. I can print from my draw preview to either the network 
colour postscript printer, or to the old HP Laserjet 4MP on the lpt1:
Henrik
17-Apr-2006
[676x2]
and with ridiculously little code
I'm wondering now whether the tendency for new printers to have built 
in postscript is going up or down...
Graham
17-Apr-2006
[678x4]
I remember that NeXT printers were so cheap because all the postscript 
processing was done by the NeXt OS, and so the printer was just a 
bare engine.
A bit like Windows printers I guess.
If you don't have a postscript printer .. I recall in the old days 
you created a large bitmap in memory, and then printed it all out 
dot by dot.
I remember driving my dot matrix printer like that.
Graham
18-Apr-2006
[682]
Now to do desktop publishing, need a hyphenation dictionary, and 
a way to do kerning.
Anton
18-Apr-2006
[683]
Graham, in your demo above
do http://www.compkarori.com/reb/psd2draw.r

How come the text disappears at different sizes ?
Graham
18-Apr-2006
[684x2]
If you're talking about the rotated and transformed text, I think 
it's because there's a glitch in the way scaling etc is computed. 
 Probably my fault, and since I don't need scaling or rotations, 
I haven't looked at it very hard.
you can see the same problem with the shaded box which rotates and 
moves in closer to the middle as the size is reduced.
Anton
18-Apr-2006
[686x7]
No, I mean all the different text strings disappear and reappear 
at different times as you drag the slider. Something to do with font 
size ?
Maybe scale-draw creates a font object with a size which is not supported 
?
For example, from code that scale-draw produces:
font1: make object! [
		name: "Nimbus Roman No9 L"
		style: none
		size: 33
		color: 255.0.0
		offset: 2x2
		space: 0x0
		align: 'center
		valign: 'center
		shadow: none
	]

font2: make object! [
		name: "Nimbus Roman No9 L"
		style: none
		size: 13
		color: 0.0.0
		offset: 2x2
		space: 0x0
		align: 'center
		valign: 'center
		shadow: none
	]

view layout [box 500x700 white effect [draw [
	box 0x0 493x698 
	fill-pen none 
	box 0x0 493x698 
	line-width 0 

 font font1 pen 255.0.0 text vectorial "REBOL PostScript Dialect" 
 59x68 
	pen 0.0.0 line 59x104 431x104 

 font font2 pen 0.0.0 text vectorial {With this dialect it's possible 
 to easily produce PostScript output.} 79x121
]]]
The second text does not appear for me on View1.3.2.3.1
but it does when font/size is at 15 instead of 13.....
Maybe my fonts are not so complete.
Gabriele
18-Apr-2006
[693]
graham, i don't think you want to look at the code (still too ugly), 
but the pdf maker does kerning.
Graham
18-Apr-2006
[694x6]
Anton, did you download that font pack I pointed to ?
When I look at the scaling, the only text that does funny things 
is the one that says "transformations"
I see both texts on my system.
as they are true type fonts, they should appear at all sizes.
Gabriele, do you use the kerning for all text placement in pdf-maker?
and where do you get the hint data from?  Is it read from the font 
somehow?
Anton
18-Apr-2006
[700x2]
Graham, oh no I didn't, sorry I missed that.
Good idea to put a link to the font pack into the ps2draw.r header.