[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Text Wrapping



At 12:01 PM 9/10/97 +0200, you wrote:
>I have a problem with text wrapping and need a solution.
>Ok, here's the deal:
>Say I want to print a text field with a lenght of 200 chars.  My page is
>of width 74 (columns).  I Print it like this:
>Print &ldtext (1,1) Wrap 70 5
>Now, when you look at the output, it's something like this:
>
>1
>                   74
>| text text text text text text text.
>            |
>So, the text does not go through to position 74.  I know the problem is
>occuring because of the fact that I use Arial 10.  Arial 10 is smaller
>than one column in SQR.  Two possible solutions: use Courier 10 or make
>the text uppercase, BUT I need to print it in Arial 10, Sentance case.
>Any answers?

We do font changes at work, and I manually compute the approximate size
based on the new font by setting our default font to 10 point, and
multiplying the string length by New font size/10.  However, you are
printing a longer string that 1 line (which we are not), and there should
be a simpler way.  If everything you print on this page should be in Arial
10, change the declared printer's point size down to match.  If you need to
support both, you may have to do some of the math I was referring to.  Here
is a sample declaration:

Declare-Layout 10point
        Paper-Size=8.5,11
        [... lots of other options ...]
        Char-Width=7.2
end-declare

The Char-Width defines the initial width of a cell on the page for sqr.
Btw, there are 72 points to an inch, so 6 width is 12 CPI (10 point fonts),
7.2 width is 10 CPI (12 point fonts).  And yes, the font point size seems
to be at odds to the points per inch, I'm sure of my numbers, so they must
be using different types of points!  If you still have the occasional
run-over happening (due to proportional fonts), you may have to adjust the
width down slightly until you get a value that seems to work almost all of
the time.  The problem with SQR and proportional fonts is that it doesn't
tell you just how long the printed value will be.

You can either use the Declare-Report to specifically name this layout, or
Declare-Layout Default to have every report use it.

Hope this helps!

Buddy Sandridge.
mes3@techie.com             Insert standard terrorist
mes3@mindspring.com             disclaimer here!
afn03656@afn.org
Backup my hard drive?  I can't find the reverse switch!