Menu

Text Alignment Problem

Help
Anonymous
2003-05-18
2003-05-18
  • Anonymous

    Anonymous - 2003-05-18

    Folks,

    This is probably just me doing something dim, but does anyone else have text alignment problems reading from a program or text file?

    The following line:
    TEXT X=0 Y=0  COLOR=240,240,240 FONTSIZE=12 FONT="times" SENSOR=PROGRAM PROGRAM="cal"

    Produces text that isn't aligned the way the program puts it out. Mainly, it puts the 3 day week that starts the month in the middile of the days of the week, as in:

    Su Mo Tu We Th Fr Sa
               1 2 3

    FIXEDPITCH=true doesn't help.

    Further, using any ALIGN except left causes odd behavior as well. ALIGN=center causes only half of each line to show up, the rest apparently being below X0. And ALIGN=right causes everything to disappear entirely.

    I have tried reading the lines individually from the program and it still runs amok. Tried using cal.pl, thinking there might be a format thing with the file output I can't see, and it acts the same.

    I am on RH 9, if that makes a diff.

    Anyone who can give me some advice on this, it would be much appreciated. I am sure I am missing something obvious to old hands.

    John P. Withers

     
    • Adam Geitgey

      Adam Geitgey - 2003-05-18

      Add WIDTH= and HEIGHT= to your TEXT line.  Otherwise, you can't use ALIGN=CENTER or RIGHT because you haven't defined where RIGHT and CENTER are :)

      As far as the other stuff, there are probably a few bugs with the new text stuff that got put in a few versions ago.  I'll check it out.

       
    • Anonymous

      Anonymous - 2003-05-18

      Sorry the spaces were stripped out of my little graphic demonstration of the days of the week there in the middle of the posting. The numbers should be right about in the middle in relation to the days of the week abbreviations above them.

       
    • Anonymous

      Anonymous - 2003-05-18

      Adam,

      The W and H settings took care of the center and right alignment problems. Thanks.

      I have played with this a bit more, and it looks like extra spaces are getting stripped out of the lines. Which I can see as being a normally reasonable thing, just suboptimal in this case.

       

Log in to post a comment.