[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR and Courier New Fixed Font Code Example
There are some other gurus there at ONTKO as well.
That's the place to go for SQR Consulting and/or
Training.
LH
--- Dietrich Schmitz <SchmitzD@UPSTATE.EDU> wrote:
> Kudos to Mr. SQR's 'twin brother'.
>
> Dietrich T. Schmitz
> Customer Support Rep. IMT UMAS
> Upstate Medical University
> (315) 464-8897
> schmitzd@upstate.edu
>
> >>> nathant@ONTKO.COM 04/24/02 11:55AM >>>
> On Fri, Apr 19, 2002 at 04:28:38PM -0400, Dietrich
> Schmitz wrote:
>
> > #define pitch_17
> >
> > begin-setup
> > declare-layout default
> [...]
> > #ifdef pitch_17
> > ! 17.[142857...] pitch
> > line-height = 7 pt
> > char-width = 4.2 pt
> > #end-if
> > end-declare
> > end-setup
> >
> > begin-program
> > do main
> > end-program
> >
> > begin-procedure main
> [...]
> > #ifdef pitch_17
> > alter-printer font=3 point-size=7
> pitch=17.142857
> > print '17 pitch' (1,1)
> > #end-if
> >
>
> Note that if you aren't changing the font size "on
> the fly" as your
> program runs, you may want to use DECLARE-PRINTER
> instead of
> ALTER-PRINTER to set the font size.
>
> The big advantage of this is that both the
> DECLARE-LAYOUT and
> DECLARE-PRINTER sections can be found in a single
> #include file that
> gets included within the BEGIN-SETUP section. (If
> you use
> ALTER-PRINTER, that line must be located within the
> program itself,
> separate from the BEGIN-SETUP section.)
>
> However, if you aren't sure which "printer" will be
> used when your run
> the program (PS, HP, etc.), then you will need to
> include
> DECLARE-PRINTERs for each printer type that might be
> used.
>
> For example, if you are using the "#define pitch_17"
> approach shown
> above, you would probably say something like
> #ifdef pitch_10
> #define point_size 12
> #define pitch 10
> #end-if
> [etc...]
> #ifdef pitch_17
> #define point_size 7
> #define pitch 17.142857
> #end-if
>
> declare-printer
> type=HP
> font=3
> point-size={point_size}
> pitch={pitch}
> [etc....]
> end-declare
> declare-printer
> type=PS
> [etc....]
> [etc....]
> )
>
> (Also note that DECLARE-PRINTER TYPE=PD was not
> available until version
> 6.1 or so; if you are using PDF output on an earlier
> version of SQR,
> you'll need to use the ALTER-PRINTER approach.)
>
>
>
> Nathan
>
----------------------------------------------------------------------------
> Nathan Stratton Treadway | Ray Ontko & Co. |
> Software consulting services
> nathant@ontko.com | Richmond, IN |
http://www.ontko.com/
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/