Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Justifying text

From: carl:cybercraft at: 15-Dec-2002 18:35

On 15-Dec-02, Carl Read wrote:
> On 15-Dec-02, Gabriele Santilli wrote: >> Hi Carl, >> On Saturday, December 14, 2002, 1:40:49 PM, you wrote: >>>>> layout [x: text " abc "] >> layout [x: text as-is " abc "] > Thanks Gabriele! (And Romano!:) > And that simplified things a lot, as did adding background colors to > the text faces so I could see exactly what was happening. > So, here's the debugged version. (; (Well, at least on Amiga.)
Just checked it on Windows and the padded lines are a pixel-width out. (It's pixel-perfect on Amiga.) Changing the following line in the justify function... either rem = 0 [0][pad] to... either rem = 0 [0][pad - 1] fixes it on Windows, but then it mucks up the padded lines by a pixel on the Amiga version. (: Pretty close either way though! -- Carl Read