[futurebasic] Re: [FB] Full Carbon printing demo (Modified by Rich Love)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2004 : Group Archive : Group : All Groups

From: Joe Lewis Wilkins <PepeToo@...>
Date: Fri, 23 Jan 2004 12:23:41 -0800
First observation, Rich, is that I believe you've misspelled "Courier", 
and that might be the problem.

Joe Wilkins

Rich Love wrote:

> OK, now that I have the demo printing some sample text, how do I set 
> the font and size for the printed output.
> The standard TEXT font,size command does not work as shown below
>
>
> DIM AS CONTAINER gPrintText
> END GLOBALS
>
> local fn BuildNewWindow
> '~'1
> dim as long      untitledNum
> dim as Str255    wTitle
> dim as Handle  @ contentH
> dim as OSStatus  err
>
> wTitle      = "Untitled"
> untitledNum = fn NextNewWindowCount
> if ( untitledNum > 1 ) then wTitle += str$( untitledNum )
> window fn NextFBWindowNum, wTitle
>
> //  Set the font and size here (but it does not work)
> local fn GetFontNumber( fontName as Str255 )
> dim @ fontNum
> call GetFNum( fontName, @fontNum )
> end fn = fontNum
> text fn GetFontNumber( "Courrier" ), 8
>
>
> // invent some "text"
> gPrintText = "Test Line One"+ chr$(13) + chr$(10)
> gPrintText = gPrintText + "Test Line Two"+ chr$(13) + chr$(10)
> contentH = [@gPrintText]
>
> // attach it to the window as a WindowProperty
> err = fn SetWindowProperty( window( _wndRef ), _kMyAppSignature, ¬
>    _kMyDocContentProperty, sizeof( Handle ), @contentH )
>
> end fn
>
>
>
> Rich Love - Carnation Software
> MacWise Terminal emulation for Macintosh
> richlove@...
> http://www.carnation-software.com
> 512 858-9234
>
>
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>
>