MakeBitmapFont
MakeBitmapFont FontIndex, RGB, [Format = 2]
 
Parameters:

    FontIndex = The index identifier of the font you wish to convert
    RGB = The Colour of the bitmap font in RGB format
    [Format = 2] = Optional format to convert to, defaults to 2 (Video bitmap)
Returns: NONE
 

     MakeBitmapFont converts a windows font to an internal bitmap version. Bitmap fonts render faster, and can even be pre-blended with other images to created custom character sets.


[ Format Flags ]
2= Video Bitmap Font
4= FX Bitmap Font
8= Compressed Raster Font


      The format flags allow us set the type of bitmap font that PB should convert the current font into. The conversion engine supports converting between most of the formats, but not every combination is supported.

Available Conversion methods


Windows True Type/Bitamps Fonts

      -> To Video Bitmap
      -> FX Bitmap
      -> To Compressed Raster


Video Bitmap Fonts

      -> Bitmap fonts To FX BITMAP
      -> To Compressed Raster


FX Bitmap Fonts

      -> Fx fonts To Video Bitmap Fonts
      -> To Compressed Raster

Compressed Raster Fonts

      -> No methods







FACTS:


      * Fonts converted to CRF format generally render faster and support real time Ink colouring.

      * Fonts that are converted to bitmap format (FX.AFX) are not affected by changes to the current ink colour.




Mini Tutorial:


      This simple example loads the windows Arial font, one loaded it then converts this font to bitmap version

  
  
; Load the "Arial" font as font 2, of size 24, in the normal style
  LoadFont "Arial",2,24,0
  
; Convert font 2 to a Bitmap font in a blue colour
  MakeBitmapFont 2,RGB(20,30,255)
  
; Set Font 2 at the current font.
  SetFont 2
  
; Display a message in the New current font
  Print "This text is displayed in the Arial font"
  
; Display the screen and wait for a key top be pressed
  Sync
  WaitKey
  
  



This example would output.

  
  This Text is displayed in the Arial font
  

 
Related Info: BlendBitmapFont | CreateBitmapFont | CreateFXFont | GetFontChr | LoadFont | LoadNewFont | PrepareFXFont | SaveFont :
 


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