igiLoadFont

Loads a font for IGI text. Takes path (A .ttf or .otf file), size (Its size in pixels). Returns: A font handle for igiPushFont (0 if the file can't be loaded on desktop).

IGI

Parameters & Returns

Parameters

path String
size Int

Returns

Int

Quick Summary

Loads a font for IGI text. Takes path (A .ttf or .otf file), size (Its size in pixels). Returns: A font handle for igiPushFont (0 if the file can't be loaded on desktop).

Technical Exegesis...

Loads a font for IGI text. On the web the file is fetched in the background: until it arrives, igiPushFont of it keeps the current font. IGI's own font is Liberation Sans 16 px.

Styling and fonts can be set up once, in Main, before the loop. See the IGI guide.

Returns: A font handle for igiPushFont (0 if the file can't be loaded on desktop).

Example

Example.bam
Global title:Int = igiLoadFont("Media/MyFont.ttf", 28)
; ...
igiPushFont(title)
igiText("Game Over")
igiPopFont()