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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Henrik
22-Apr-2006
[852]
but maybe it was because it was an external bitmap and not one created 
by rebol
Graham
22-Apr-2006
[853]
the image there was loaded off a camera
Henrik
22-Apr-2006
[854x2]
newlines are made with \
that should be easy to do...
Graham
23-Apr-2006
[856x5]
Looking at algorithms for text justification.  One I looked at says, 
collect all the words that will fit on a line with a space, count 
the spaces, and the area left over, and allocated part of that extra 
space to all of those spaces.
No kerning involved in this one.
Text flow, with justification, word wrapping, and footnotes is not 
a simple task.
Since your centering routine didn't work, I just stuck with my original 
one, and that seems to work for me.
I've got a box with text in it, and all the text is centred.  I can 
translate that box to anywhere on the screen.
Henrik
23-Apr-2006
[861]
is that in DRAW?
Graham
23-Apr-2006
[862x2]
Yes.
and postscript.
Graham
24-Apr-2006
[864]
Hmm.  Lengths of text strings is different when measured as one string 
including spaces, or adding the lengths together of each word with 
a space in a sentence.
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 ;)