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

World: r3wp

[View] discuss view related issues

Henrik
13-Oct-2008
[8186]
Too deep for me to solve that tonight. However I've come this far:

http://rebol.hmkdesign.dk/files/vid-postscript2.png
Graham
13-Oct-2008
[8187]
if you track the font size, then you have the vertical size of the 
text.
Anton
14-Oct-2008
[8188x2]
Improving... How fast can it render the postscript ? Can you make 
it dynamic update ?
Graham, the relationship between font/size and lineheight is not 
so simple, unfortunately.
Graham
14-Oct-2008
[8190]
in postscript ...
Henrik
14-Oct-2008
[8191x3]
Anton, by far the slowest component is Ghostscript. Creating the 
postscript file is about as fast as an ordinary layout.
The advantage is that it's rendered from faces, not VID directly, 
so I assume this will work with RebGUI as well.
Anton, it takes about 2-5 seconds to create the render here
Graham
14-Oct-2008
[8194]
Henrik, what exactly are you doing?
Henrik
14-Oct-2008
[8195]
Graham, I'm creating postscript output from faces. That's all.
Graham
14-Oct-2008
[8196]
cool
Henrik
14-Oct-2008
[8197]
it works like TO-IMAGE.
Graham
14-Oct-2008
[8198]
so, for multiple pages?
Henrik
14-Oct-2008
[8199]
one page per layout
Graham
14-Oct-2008
[8200]
so, to produce the postscript from multiple layouts?
Henrik
14-Oct-2008
[8201]
foreach l layouts [to-postscript l]
Graham
14-Oct-2008
[8202]
so this produces a single page of postscript?
Henrik
14-Oct-2008
[8203x4]
each to-postscript call produces one single page.
that means if you have 4 pages, you create 4 separate layouts and 
call to-postscript 4 times.
but it's quite possible that I could deliver a block of layouts...
...to to-postscript to generate multiple pages in one go.
Graham
14-Oct-2008
[8207x2]
that's what I do at present ... I have a block of layouts
and then i generate a single page of postscript from all the layouts
Henrik
14-Oct-2008
[8209]
a single page from multiple layouts?
Graham
14-Oct-2008
[8210x4]
yes
no
one postscript file but multiple pages
inefficient to produce a single postscript file for each layout
Henrik
14-Oct-2008
[8214x2]
yes, true
I can upload it it you want to play with it.
Graham
14-Oct-2008
[8216x2]
sure ..
My method is because I have a single document that goes over many 
pages
Henrik
14-Oct-2008
[8218x2]
http://rebol.hmkdesign.dk/files/to-postscript.r
load Geomol's postscript.r first.
Graham
14-Oct-2008
[8220x2]
where is it?
this one ? http://hmkdesign.dk/rebol/postscript/postscript.r
Henrik
14-Oct-2008
[8222]
yes, that will be fine
Graham
14-Oct-2008
[8223]
neat
Henrik
14-Oct-2008
[8224]
I've now added multipage support (simpler than I thought)
Graham
14-Oct-2008
[8225x2]
even better
Anyway, excellent way to get a screen print of a View layout
Henrik
14-Oct-2008
[8227x2]
it's almost stupidly simple. :-) it's one of those things I wish 
I came up with 2-3 years ago. could have saved a lot of work. the 
secret is just to slavishly follow the offsets and sizes already 
generated with VID or RebGUI.
no fancy postscript measuring tools are used.
Graham
14-Oct-2008
[8229]
I'm not sure it would work with microjustification of text
Henrik
14-Oct-2008
[8230]
we don't have finer type setting features, but I can live with that, 
as long as I have a simple and quick way to build postscript pages.
Graham
14-Oct-2008
[8231]
can you get that type of resolution with View?
Henrik
14-Oct-2008
[8232]
if you scale your view up and then appropriately scale the postscript 
down, yeah
Graham
14-Oct-2008
[8233]
scale it up so that it's too big for the screen?  :)
Henrik
14-Oct-2008
[8234]
yes, you can create 10000x10000 layouts if you want to, they just 
won't fit on the paper without scaling them down. I did something 
similar once in a different system, but it proved to be unusably 
slow on smaller PCs and it eats memory.
Graham
14-Oct-2008
[8235]
yes