DEATHSHADOW'S
MADNESS
Madness and You, Perfect together!

  1. Top of Page
  2. Main Menu
  3. Page Content
  4. Page Extras
  5. Bottom of Page

Constructor tglKernedFont.init

Declaration


  constructor init(fontName:string; glHeight:glFloat);

Purpose

Call when creating object to load the specified font.

Parameters

fontName : string

The name of the font, without the extension. The .glkfont (or other extensions) will be added automatically.

glHeight : glFloat

The height the font should render at in the default scale, in openGL viewport coordinates as set by glOrtho or other commands.

Code Example


  glOrtho(0,160,50,0,0,$FFFF);
  demoFont.init('test_36x60',2); 
  {
    At scale 1, the font will give you 25 lines of characters
    at 1 distance. The 50 height of the projection divided by
    our glHeight of two.
  }
  1. Top of Page
  2. Main Menu
  3. Page Content
  4. Page Extras
  5. Bottom of Page