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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Gabriele
24-Apr-2006
[865]
Text flow, with justification, word wrapping, and footnotes is not 
a simple task.
 you bet :) that's 60% of TeX.
Pekr
24-Apr-2006
[866x2]
insert REBOL 3.0 compress load unpack %tech-sources.zip ;-)
... the smiley was not grin, I just tried to produce valid rebol 
line :-) .... insisting we are able to read archives in 3.0 :-)
Graham
24-Apr-2006
[868x8]
w
Without re-writing TeX, what I am trying to do is allow text to flow 
from one text box to another on the same page, and then on to other 
pages.
Although this is not too bad to do if you know in advance how much 
text there is, it's somewhat harder when you don't.
http://www.compkarori.com/reb/psd2draw1.r
Is a "fudged" example of page with two textboxes where the text flows 
down one textbox and then into the other while nearly being justified.
If you use the "edit data" button, and change the word "justify" 
to "left", and save, the text reappears without the full justification.
As you can see, the justification algorithm is imperfect .. and it's 
still a little ragged on the right.
I guess it doesn't matter too much as it is just a preview for postscript. 
 the output to postscript is yet to be done.
Graham
25-Apr-2006
[876]
All this stuff is harder than I first thought.  I now have to implement 
floating text tables so that one follows the other when the text 
amount is unknown.
Gabriele
26-Apr-2006
[877]
so maybe you now have an idea why i haven't done pdf maker 2 yet. 
:)
Graham
26-Apr-2006
[878x2]
Hey, Gabriele .. you're forgiven !!
Have you got some ideas on reading the TeX sources ?
Gabriele
26-Apr-2006
[880x2]
i have studied TeX a lot in the last couple months.
my plan is to be as good as TeX in pdf maker 2 (no math formatting 
planned though)
Graham
26-Apr-2006
[882x2]
So, port TeX to Rebol ?
Neat :)
Gabriele
26-Apr-2006
[884]
and of course i plan to document it very well (again, as good as 
TeX) so that everyone will be able to use it
Graham
26-Apr-2006
[885]
How's your literate tool coming along?
Gabriele
26-Apr-2006
[886]
only problem is that this will take time so i'm not sure i can give 
an eta. however, qtask needs pdf output so this should happen soon 
enough.
Graham
26-Apr-2006
[887]
I guess closures will help in programming some like TeX.
Gabriele
26-Apr-2006
[888]
i haven't worked on wetan much in the last weeks. busy with other 
things. but i need it so i hope to be back to it soon.
Graham
26-Apr-2006
[889]
Tracking all those margins , current text positions, translations, 
rotations etc.
Pekr
26-Apr-2006
[890]
so will rebol 3 be able to count presice metrics for fonts etc.?
Graham
26-Apr-2006
[891x2]
surely that's not part of Rebol 3.
It would have to be an add on product.
Gabriele
26-Apr-2006
[893]
hmm, r3 will have rich text, but i don't think there are any plans 
for a real typesetter.
Graham
26-Apr-2006
[894x2]
what's this new typeset! function then :)
just kidding ...
Pekr
26-Apr-2006
[896]
:-)
Gabriele
26-Apr-2006
[897x2]
;)
once you have a typesetter written in rebol, though, you can apply 
it to draw too; draw doesn't offer the low level access to font data 
you need, so that will need to be separate; but if you can do it 
for pdf, you can do it for whatever, if you use the same fonts.
Graham
26-Apr-2006
[899]
So, that also mean creating bitmaps for direct printing?
Gabriele
26-Apr-2006
[900x2]
well.... i guess to image! can help with that.
unless you want to rewrite AGG in rebol ;)
Graham
26-Apr-2006
[902x2]
just a quick question .. was it hard/easy to do images in pdf-maker 
?
I'm guessing the same operations are used to include images in postscript.
Gabriele
26-Apr-2006
[904x2]
you just include the raw rgb data
and, in pdf 1.4, optional alpha channel data
Graham
26-Apr-2006
[906x2]
so, there's no translation involved ?
inverting the image?
Gabriele
26-Apr-2006
[908x3]
in ps you have to encode the data i guess
you need to invert the alpha channel because it's the opposite in 
rebol
but you can do that as a filter in pdf
Graham
26-Apr-2006
[911]
since 0x0 is bottom left in ps, and top left in Rebol ...
Gabriele
26-Apr-2006
[912x2]
but for images samples, the first sample is the top left corner
so i don't have to reorder the pixels in pdf maker if that's what 
you are asking
Graham
26-Apr-2006
[914]
Is there anything that can be done for R3/draw  that helps support 
pdf/postscript creation?