FontID()
Syntax
FontID = FontID(#Font)Description
Returns the unique system identifier of the #Font.
Parameters
#Font The font to use.
Return value
Returns the ID of the font. This result is sometimes also referred to as a 'Handle'. Take a look at the extra chapter Handles and Numbers for more information.
Example
An example of using FontID() in combination with DrawingFont():If OpenWindow(0, 100, 200, 300, 200, "2D Drawing Test") If CreateImage(0, 300, 200) If StartDrawing(ImageOutput(0)) DrawingMode(#PB_2DDrawing_Transparent) LoadFont(0, "times", 30) DrawingFont(FontID(0)) DrawText(10, 50, "Hello world !", RGB(255, 0, 0)) LoadFont(0, "verdana", 12) DrawingFont(FontID(0)) DrawText(10, 150, "This is a green verdana text", RGB(0, 255, 0)) StopDrawing() EndIf EndIf ; Create a gadget to display the image ; ImageGadget(0, 0, 0, 300, 200, ImageID(0)) EndIf
See Also
LoadFont(), DrawingFont()
Supported OS
All