GetFreeFont
FreeFontIndex = GetFreeFont()
 
Parameters: NONE
Returns:

    FreeFontIndex = The Index value of a Font that is currently not in use
 

     The GetFreeFont() function returns the Index of a Font that is currently NOT in use.



FACTS:


      * GetFreeFont() will return a always return a valid font index, providing the computer hasn't run out of memory.




Mini Tutorial:


      Requesting a free Font index, then loads the Arial font and displays a message.

  
; Request a Free Font index from playbasic
  MyFont=GetFreeFont()
  
; Load the "Arial" font as MyFont, size 24, in the normal style
  LoadFont "Arial",MyFont,24,0
  
; Set MyFont at the current font.
  SetFont MyFont
  
; Display What Font Index the Arial font was loaded into.
  Print "Arial Font Load as font #"+Str$(MyFont)
  
; Display the screen and wait for a key to be pressed
  Sync
  WaitKey
  
  


This example would output.

  
  Arial Font Load As font #2
  


 
Related Info: DeleteFont | FontQuantity | GetCurrentFont | LoadFont | LoadNewFont | SetFont :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com