[futurebasic] Re: [FB] Font, Arial substituted by Geneva

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

From: Steve Flavel <stevef@...>
Date: Tue, 12 Oct 2004 07:38:57 +1000
> Steve Flavel on Mon. Oct 11 wrote:
>  Hi,
>  Help
>  I have a user who reports that a static edit field is not displaying
>  Arial 24.   He is running 10.3.5 on an iMac
>  His screen shot suggests that Geneva is substituted.
>  He also reports that Arial is present in his Font folder.
>  (He does not indicate which Font Folder)
>  Of course it works perfectly on my Powerbook G4 running 10.3.5
>  - Steve F
> '-----------------------------------------------------------------------------
> -----------------
> 
> Hi Steve,
> My test program (see below) works as expected too. (Sys 9.2.2 and OS-X 10.3.5)
> example...
>  GetFNum(fontName$, fontNum )
>  TEXT fontNum, 24, 1
>  EDIT FIELD efNum, "ABCD abcd 01234 ", (40,100)-(440,130),
> _statFramed, _leftJust
> 
> Brainstorming... (aka Things that I have done incorrectly other times.)
> 1.  The Arial fonr is not installed on his computer.
> 2.  Does the program call anything else between setting the font and
> actually making the edit field. If so, the other routine may be
> changing the active font there.
> 3.  The Arial font is corrupted.
> 4.  If the font is being set somehow while the window is not active,
> then it wont affect the edit field within that window.
> 5. If your program uses the toolbox routine getFnum( fontName,
> fontNum ) then it will give fontNum 0 for non-existent fonts. Font 0
> is the System font for menus in System 9 & before and I believe also
> in OS-X. He may be using Geneva there too.???
> 
> Here is a short program I used to compare fonts, getting them by name
> and displaying them in Edit fields.  An IF test can be used in case
> the fontNum is zero and you wish to warn the user. I just beeped.
> '-----------------------------------------------------------------------------
> -----------------
> 
> '~GLOBAL VARIABLES . . .
> DIM AS RECT RECT R
> DIM @ efNum
> END GLOBALS
> 
> '~SUBPROGRAMS ...
> 
> LOCAL FN showFont( fontName$ )
>  DIM @fontNum
>  DIM efTxt$
>  GetFNum(fontName$, fontNum )  ' toolbox procedure
>  IF fontNum = 0 THEN BEEP
>  TEXT fontNum, 24, 1
>  OffsetRect(R, 0,40 )
>  efNum ++
>  efTxt$ = USING "  ####"; fontNum
>  efTxt$ =  "ABCD abcd 01234 " + fontName$ + efTxt$
>  EDIT FIELD efNum, efTxt$, @r, _statFramed, _leftJust
>  DELAY 1000
> END FN
> 
> '~MAIN PROGRAM . . .
> 
> WINDOW 1, "Fonts and Font Numbers"
> DIM @ zzz
> 
> SetRect( R, 24,20,500,50)
> efNum = 0
> 
> FN ShowFont( "Courier" )
> FN ShowFont( "Arial" )
> FN ShowFont( "Helvetica" )
> FN ShowFont( "Geneva" )
> FN ShowFont( "xxx" )    ' <--- gives 0 for fontNum; displays system menu font
> 
> TEXT _Geneva, 10, 1, 12
> INPUT %(10,WINDOW(_height)-5) " Press 'return' to continue..."; zzz
> '-----------------------------------------------------------------------------
> -----------------
> 
> HTH,
Yes it does. I have put in a warning message for the absence of Arial.

Thanks Stu

Steve