[futurebasic] Re: [FB] what is the _applfont ???

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2001 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Thu, 14 Jun 2001 11:48:32 -0500
Here's da ting:

There are two fonts that are handled in a special way: the 
application font and the system font. I say special because you can 
access them by using any of the following methods:

CALL TEXTFONT(0)  : REM system
TEXT 0,0          : REM system font default size
CALL TEXTFONT(1)  : REM app font
TEXT 1,0          : REM app font default size

We normally substitute the constants (like _applFont) for clarity, 
but I am switching to numbers here so you can see what happens 
underneath.

The system font is one that you select in the appearance manager. The 
application font is one that is set up in an application's partition. 
(Well, technically it is stored as a low memory global and switched 
out and in with the application.)

You can actually change the font that is used by ..

% _appFontID,myNewFontID  : REM "%" means POKE WORD


There is no rule that FB must set the font to the application font 
when it creates a grafport, but you can do so by adding a TEXT 
statement right after the window is opened.

As a side note, FB's TEXT statement sets some internal variables 
which are later used when the runtime is unsure as to what font is 
needed. In this respect, it is better to use TEXT than CALL TEXTFONT.

>I don't understand what is the _applfont in TEXT _applfont, x
>In the manual it is stated that it is the default font for the app.
>But in the following exemple, the font uses before any TEXT command 
>use (my concept of default font...) is different from that after the 
>TEXT _applfont, x...
>So what is the "true" default font ?
>
>Thanks
>Marc Girondot
>
>
>dim i
>
>WINDOW #1, "Try", (100,100)-(500,620), _DocNoGrow
>
>rem the font uses by program just after a launch is used
>for i=1 to 8
>print %(0, (i*2)*20) i+8; " abcdefghijklmnopqrstuvwxyz";
>next i
>
>rem and here it is after applying the _applfont... it is not the same !
>for i=1 to 8
>text _applfont, i+8
>print %(0, (i*2)*20+20) i+8; " abcdefghijklmnopqrstuvwxyz";
>
>next i
>
>
>"e" if inkey$="" then goto "e"
>
>end
>--



Best,

-STAZ  ~)~

800.348.2623 Orders  http://www.stazsoftware.com
228.255.7086 FAX     mailto:staz@...