Re: Comet PDF Printer Does change the title


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on February 04, 2009 at 10:00:38:

In Reply to: Re: Comet PDF Printer Does change the title posted by Mike Saunders on February 03, 2009 at 13:59:51:

+40. Wow, that's just under the overnight low at my house. San Diego County, inland from the city, has long thermometers (diff between low and high for the day). Today's the last good day this week (+75). Cool front, low-60's, and rain (what passes for rain here) coming.

This is something I've done minor tests with but not done in a production program. If you look at the docs, you'd think that (SelectSysFont) only works with 0 to 2. Bryce, bless him, showed or told me that's not true.

From CFORM I grabbed font changing logic like ...

!-------------------------------------------------------------------------------
Y1 = Y1 + (2 * LineHeight)
LFHEIGHT$ = INTELD(12*20)
LFWIDTH$ = INTELD(100)
LFWEIGHT$ = INTELD(FW.NORMAL)
LFCHARSET$ = INTEL(ANSI.CHARSET) ! NEEDED FOR SPECIAL FONT
LFFACENAME$ = 'MICR E13B'+ NULLBYTE$
GOSUB SETFONT
Data$ = '1234567890ABCD'
Print (Lun) (TR);(TextOut = X1, Y1);Data$;NullByte$
!==============================================================================
SETFONT:
PRINT (#, LOGFONT)
INPUT (#) DATA$
PRINT (LUN, FMT.SELECTFONT)
GOSUB CALCLINEHEIGHT
RETURN
!
CALCLINEHEIGHT:
! Character height
PRINT (LUN) (GetFontInfo = PTR.FONT.HEIGHT)
GOSUB GETRESULT
LINEHEIGHT = LORESULT
! External leading is the space between lines
PRINT (LUN) (GetFontInfo = PTR.FONT.EXTLEADING)
GOSUB GETRESULT
LINEHEIGHT = LINEHEIGHT + LORESULT
RETURN
!----------------------------------------------------------------------

MICR is a font that needs "ANSI" instead of "OEM". Something to remember because you'll get bitten eventually.

So based on what Bryce told me, I'm (eventually) going to change to using this ...

!===============================================================================
PRINT (LUN) (TR);(SelectSysFont=15)
GOSUB CALCLINEHEIGHT
!===============================================================================

To make this work you need to add lines to the user's COSW.INI or, better, the COSWGLOB.INI.

Font-11=Lucida Console, 12, 11, 0, 6
Font-12=Lucida Console, 12, 12, 0, 6
Font-13=Lucida Console, 12, 13, 0, 6
Font-14=Lucida Console, 12, 14, 0, 6
Font-15=Lucida Console, 12, 15, 0, 6
Font-16=Lucida Console, 12, 16, 0, 6
Font-17=Lucida Console, 12, 17, 0, 6
Font-18=Lucida Console, 12, 18, 0, 6
Font-19=Lucida Console, 12, 19, 0, 6
Font-20=Lucida Console, 12, 20, 0, 6
Font-99=Arial, 12, 10, 0, 6
Font-100=IMPACT, 12, 10, 0, 6
!=====================================================
11-20 are the same font with just the CPI changed. Don't really need to recalc the Line Height.

Not quite sure on what the numbers (12, 10, 0, 6) do when working with a non-fixed pitch font.

And I'm not sure how high the Font-nnn goes.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]